/* ================================================
   Han Blog Widget — HanTema v1.0.0
   ================================================ */

/* ── Variables ── */
.han-blog-wrap {
    --hb-yellow:      #D4B84A;
    --hb-yellow-lt:   #F0E080;
    --hb-green:       #2D6A4F;
    --hb-text:        #1E1E1E;
    --hb-muted:       #6B7280;
    --hb-border:      #E5E0D6;
    --hb-bg:          #F5F0E8;
    --hb-white:       #ffffff;
    --hb-radius:      18px;
    --hb-radius-img:  16px;
    --hb-gap:         24px;
    box-sizing: border-box;
}
.han-blog-wrap *, .han-blog-wrap *::before, .han-blog-wrap *::after {
    box-sizing: inherit;
}

/* ── HEADER ── */
.hb-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}
.hb-header-left { flex: 1; min-width: 0; }
.hb-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--hb-white);
    border: 1px solid var(--hb-border);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hb-text);
    margin-bottom: 12px;
    line-height: 1.4;
}
.hb-badge svg, .hb-badge i { font-size: 12px; }
.hb-main-title {
    font-size: 38px;
    font-weight: 900;
    color: var(--hb-text);
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
}

/* NAV BUTTONS */
.hb-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.hb-nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    border: 1.5px solid var(--hb-border);
    background: var(--hb-white);
    color: var(--hb-text);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .22s, border-color .22s, color .22s, transform .18s;
    line-height: 1;
    flex-shrink: 0;
}
.hb-nav-btn:hover {
    background: var(--hb-yellow);
    border-color: var(--hb-yellow);
    color: #1a1a1a;
    transform: translateY(-1px);
}
.hb-nav-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

/* ── SLIDER ── */
.hb-slider-outer {
    overflow: hidden;
    position: relative;
}
.hb-slider-track {
    display: flex;
    gap: var(--hb-gap);
    transition: transform .42s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    align-items: stretch;
}

/* ── CARD ── */
.hb-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--hb-white);
    border-radius: var(--hb-radius);
    overflow: hidden;
    box-shadow: var(--hb-shadow);
    transition: transform .3s ease, box-shadow .3s ease;
    text-decoration: none;
    color: inherit;
}
.hb-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hb-shadow-hov);
    color: inherit;
    text-decoration: none;
}

/* IMAGE AREA */
.hb-card-img-wrap {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.hb-card-img-wrap img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
    border-radius: var(--hb-radius-img);
}
.hb-card:hover .hb-card-img-wrap img {
    transform: scale(1.06);
}

/* CATEGORY BADGE */
.hb-card-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--hb-text);
    line-height: 1.4;
    white-space: nowrap;
}

/* ARROW BUTTON */
.hb-card-arrow {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hb-yellow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    color: #1a1a1a;
    text-decoration: none;
    transition: background .22s, transform .22s;
    flex-shrink: 0;
}
.hb-card-arrow i,
.hb-card-arrow svg {
    font-size: 13px;
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}
.hb-card:hover .hb-card-arrow {
    background: var(--hb-yellow-lt);
    transform: rotate(45deg);
}

/* CARD BODY */
.hb-card-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* META */
.hb-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--hb-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
    row-gap: 6px;
}
.hb-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.hb-card-meta-item i,
.hb-card-meta-item svg {
    font-size: 11px;
    opacity: .7;
}

/* TITLE */
.hb-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--hb-text);
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* EXCERPT */
.hb-card-excerpt {
    font-size: 14px;
    color: var(--hb-muted);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* READ MORE LINK */
.hb-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hb-green);
    text-decoration: none;
    margin-top: 12px;
    transition: gap .2s;
    line-height: 1.4;
}
.hb-card-read-more:hover { gap: 9px; color: var(--hb-green); }
.hb-card-read-more i,
.hb-card-read-more svg {
    font-size: 11px;
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* ── DOTS ── */
.hb-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}
.hb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hb-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, width .25s, border-radius .25s;
}
.hb-dot.is-active {
    background: var(--hb-yellow);
    width: 24px;
    border-radius: 4px;
}

/* ── LAYOUT: LIST ── */
.han-blog-wrap.hb-layout-list .hb-card {
    flex-direction: row;
}
.han-blog-wrap.hb-layout-list .hb-card-img-wrap {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
}
.han-blog-wrap.hb-layout-list .hb-card-img-wrap img {
    height: 100%;
    border-radius: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .hb-main-title { font-size: 28px !important; }
    .hb-card-img-wrap img { height: 220px; }
}

@media (max-width: 767px) {
    .hb-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
    .hb-main-title { font-size: 22px !important; }
    .hb-card-img-wrap img { height: 200px; }
    .hb-card-title { font-size: 15px !important; }
    .hb-card-excerpt { font-size: 13px !important; }
    .hb-dots { margin-top: 18px; }
    .han-blog-wrap.hb-layout-list .hb-card { flex-direction: column; }
    .han-blog-wrap.hb-layout-list .hb-card-img-wrap { width: 100%; min-width: unset; }
    .han-blog-wrap.hb-layout-list .hb-card-img-wrap img { height: 200px; border-radius: var(--hb-radius-img); }
}

@media (max-width: 480px) {
    .hb-nav-btn { width: 38px; height: 38px; font-size: 13px; }
    .hb-card-body { padding: 14px 14px 18px; }
    .hb-badge { font-size: 12px; }
}
