/* Blog listing & detail */

.blog-page {
    padding: 40px 0 56px;
    font-family: "Mulish", sans-serif;
}

.blog-page-header {
    margin-bottom: 32px;
}

.blog-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #3d4248;
    margin: 0 0 20px;
    line-height: 1.2;
    text-align: left;
}

.blog-page-search {
    width: 100%;
    max-width: none;
}

.blog-page-search__group {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.blog-page-search__input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    color: #3d4248;
    outline: none;
    min-width: 0;
}

.blog-page-search__input::placeholder {
    color: #aaa;
}

.blog-page-search__btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    padding: 0;
    border: none;
    border-left: 1px solid #e0e0e0;
    background: #fff;
    color: #3d4248;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.blog-page-search__btn:hover {
    background: #3d4248;
    color: #fff;
}

.blog-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.blog-page-main .blog-inner {
    margin: 0 -8px;
    display: flex;
    flex-wrap: wrap;
}

.blog-page-main .blog-inner > .grid-item {
    display: flex;
    margin-bottom: 24px;
}

.blog-page-main .blog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.blog-page-main .blog-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

.blog-page-main .blog-card__media .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.blog-page-main .blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 16px 18px !important;
}

.blog-page-main .blog-card__body .lat-blog-title {
    line-height: 1.35 !important;
    font-size: 17px !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-page-main .blog-card__body .lat-blog-date {
    margin-top: 0 !important;
    margin-bottom: 10px;
    font-size: 12px !important;
}

.blog-page-main .blog-card__body .lat-blog-detail {
    flex: 1;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-page-main .blog-card__more {
    margin-top: auto;
    align-self: flex-start;
}

.blog-page-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    color: #666;
}

.blog-page-empty i {
    font-size: 40px;
    color: #3d4248;
    margin-bottom: 16px;
}

.blog-page-empty p {
    margin: 0;
    font-size: 15px;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 36px;
    padding-top: 8px;
}

.blog-pagination .pagination {
    margin: 0;
    gap: 4px;
}

.blog-pagination .page-link {
    border-radius: 8px;
    border-color: #e0e0e0;
    color: #3d4248;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
}

.blog-pagination .page-item.active .page-link {
    background: #3d4248;
    border-color: #3d4248;
}

/* Sidebar */
.blog-page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-widget {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 20px;
}

.blog-widget__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.blog-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-widget__list li + li {
    margin-top: 4px;
}

.blog-widget__list a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #3d4248;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.blog-widget__list a:hover {
    color: #453326;
    padding-left: 4px;
    text-decoration: none;
}

.blog-recent-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.blog-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-recent-item:first-child {
    padding-top: 0;
}

.blog-recent-item__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ececec;
}

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

.blog-recent-item__body {
    min-width: 0;
    flex: 1;
}

.blog-recent-item__title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3d4248;
    line-height: 1.4;
    margin-bottom: 4px;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-recent-item__title:hover {
    color: #3d4248;
    text-decoration: none;
}

.blog-recent-item__date {
    font-size: 11px;
    font-weight: 600;
    color: #999;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-tag:hover {
    background: #3d4248;
    border-color: #3d4248;
    color: #fff;
    text-decoration: none;
}

/* Detail page */
.blog-detail-page {
    padding: 32px 0 56px;
    font-family: "Mulish", sans-serif;
}

.blog-detail-article {
    width: 100%;
    max-width: none;
    margin: 0;
}

.blog-detail-header {
    margin-bottom: 28px;
    max-width: 800px;
}

.blog-detail-title {
    font-size: 34px;
    font-weight: 700;
    color: #3d4248;
    line-height: 1.25;
    margin: 16px 0 12px;
}

.blog-detail-date {
    font-size: 14px;
    font-weight: 600;
    color: #999;
}

.blog-detail-cover {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ececec;
}

.blog-detail-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Heta Builder / legacy GrapesJS content */
.blog-detail-content--hb,
.blog-detail-content--gjs {
    width: 100%;
}

.blog-detail-content--hb img,
.blog-detail-content--hb video,
.blog-detail-content--hb iframe,
.blog-detail-content--gjs img,
.blog-detail-content--gjs video,
.blog-detail-content--gjs iframe {
    max-width: 100%;
    height: auto;
}

.blog-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 10px 18px;
    border: 1px solid #3d4248;
    border-radius: 8px;
    background: #fff;
    color: #3d4248;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.blog-detail-back:hover {
    background: #3d4248;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991px) {
    .blog-page-layout {
        grid-template-columns: 1fr;
    }

    .blog-page-sidebar {
        order: 2;
    }
}

@media (max-width: 767px) {
    .blog-page {
        padding: 24px 0 40px;
    }

    .blog-page-title {
        font-size: 26px;
    }

    .blog-page-search__group {
        flex-direction: column;
        border-radius: 10px;
    }

    .blog-page-search__btn {
        width: 100%;
        min-height: 48px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .blog-detail-title {
        font-size: 26px;
    }
}
