/* ── Layout ── */
.latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-center {
    text-align: center;
}

/* ── Blog card ── */
.blog-box figure {
    height: 280px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 13px;
    margin: 0;
}

    .blog-box figure img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

.blog-category {
    background: #333;
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    width: max-content;
    font-size: 13px;
    white-space: nowrap;
}

.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.blog-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: normal;
}

.line-border-top {
    border-bottom: 1px solid rgba(51,51,51,.48);
    height: 1px;
    width: 39%;
}

.blog-w {
    padding: 5px;
}

.blog-time {
    font-weight: 700;
    color: rgba(51,51,51,.86);
    font-size: 14px;
    white-space: nowrap;
}

.blog-box p {
    font-size: 15px;
    color: rgba(51,51,51,.86);
}

.remove-decoration-color-a-tag a {
    text-decoration: none;
    color: inherit;
}

.blog-icon {
    height: 30px;
    margin-right: 5px;
}

/* ══════════════════════════════════════════════════════
       CATEGORY TABS — single scrollable row, no wrapping
    ══════════════════════════════════════════════════════ */
.blog-tabs-wrapper {
    position: relative;
    overflow: hidden;
}

.blog-tabs {
    display: flex;
    flex-wrap: nowrap; /* one line only */
    overflow-x: auto; /* scroll if needed */
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox — hide scrollbar */
}

    .blog-tabs::-webkit-scrollbar {
        display: none;
    }
/* Chrome/Safari */

.blog-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    cursor: pointer;
    color: #555;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap; /* prevent text wrap */
    flex-shrink: 0; /* don't shrink */
    transition: color .2s, border-color .2s;
}

    .blog-tab-btn.active {
        color: #000;
        border-bottom-color: #000;
        font-weight: 600;
    }

/* Arrow scroll buttons for tabs (visible when tabs overflow) */
.tab-scroll-btn {
    display: none; /* shown via JS when needed */
    position: absolute;
    top: 0;
    bottom: 2px;
    width: 32px;
    border: none;
    cursor: pointer;
    z-index: 3;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #fff 60%, transparent);
    color: #333;
    padding: 0;
}

    .tab-scroll-btn.right {
        right: 0;
        background: linear-gradient(to left, #fff 60%, transparent);
    }

    .tab-scroll-btn.left {
        left: 0;
    }

.line-border {
    border-top: 1px solid #ccc;
    margin: 0 0 16px;
}

/* ══════════════════════════════════════════════════════
       CAROUSEL
    ══════════════════════════════════════════════════════ */
.carousel-wrapper {
    position: relative;
}

.carousel-inner {
    overflow: hidden;
}

/* Track holds ALL slides side by side; transform slides the window */
.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform .4s ease;
    will-change: transform;
}

.carousel-slide {
    /* Each slide takes exactly 1/3 of visible width minus gaps */
    flex: 0 0 calc(33.333% - 20px);
    min-width: 0;
}

/* Prev / Next buttons */
.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .carousel-btn.prev {
        left: -18px;
    }

    .carousel-btn.next {
        right: -18px;
    }

    .carousel-btn:disabled {
        opacity: .35;
        cursor: default;
    }

/* Dots */
.carousel-dots {
    text-align: center;
    margin-top: 16px;
}

.carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 4px;
    cursor: pointer;
    transition: background .2s;
}

    .carousel-dot.active {
        background: #333;
    }

/* Loading */
.blog-loading {
    display: none;
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 15px;
}

    .blog-loading.visible {
        display: block;
    }

/* ── Responsive ── */
@media (max-width: 991px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 767px) {
    .carousel-slide {
        flex: 0 0 100%;
    }

    .blog-box {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 20px;
    }

    .blog-body {
        padding: 15px;
        text-align: center;
    }

    .blog-header {
        margin-bottom: 16px;
    }

    .blog-category {
        font-size: 12px;
        padding: 6px 13px;
    }

    .blog-title {
        font-size: 15px;
    }

    .blog-icon {
        height: 21px;
    }

    .blog-tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (min-width: 1279px) and (max-width: 1440px) {
    .blog-box figure {
        height: 200px;
    }

    .blog-title {
        font-size: 16px;
    }

    .blog-box p {
        font-size: 12px;
    }
}
