/* Block headline tin tức - BVĐK Hậu Lộc (giao diện máy tính) */
.hlx {
    --hl-blue: #0d5ca8;
    --hl-blue-dark: #0a4785;
    --hl-red: #d9261c;
    --hl-line: #e3e9f0;
    --hl-text: #1f2a37;
    --hl-muted: #6b7684;
    --hl-bg-soft: #f4f8fc;
    display: grid;
    align-items: stretch;
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    gap: 16px;
    margin: 0 0 16px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--hl-line);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(13, 92, 168, .06);
    font-size: 14px;
    color: var(--hl-text);
}
.hlx *, .hlx *::before, .hlx *::after { box-sizing: border-box; }
.hlx a { color: inherit; text-decoration: none; }

/* ===== Slider ===== */
.hlx-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hlx-stage {
    position: relative;
    flex: 1 1 auto;           /* cao bằng cột tab bên phải */
    min-height: 0;
    aspect-ratio: 16 / 10;    /* tối thiểu 16:10 */
    border-radius: 6px;
    overflow: hidden;
    background: #0b2742;
}
.hlx-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .6s ease, visibility .6s;
}
.hlx-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hlx-media, .hlx-noimg { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; }
/* Lớp nền: chính ảnh đó phóng to + làm mờ, lấp phần dôi ra khi khung cao hơn 16:10 */
.hlx-media .hlx-bg {
    position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px);
    object-fit: cover; filter: blur(18px) brightness(.75) saturate(1.1);
}
/* Ảnh chính: hiện đủ, không cắt chữ trên banner */
.hlx-media .hlx-fg {
    position: relative; display: block; width: 100%; height: 100%;
    object-fit: contain; object-position: center 30%;
    transition: transform 6s ease;
}
.hlx-slide.is-active .hlx-media .hlx-fg { transform: scale(1.03); }
.hlx-noimg { display: flex; align-items: center; justify-content: center; font-size: 64px; color: rgba(255,255,255,.35); background: linear-gradient(135deg, #0d5ca8, #0a3a66); }

.hlx-cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 48px 18px 16px;
    background: linear-gradient(to top, rgba(4, 22, 40, .92) 0%, rgba(4, 22, 40, .65) 55%, rgba(4, 22, 40, 0) 100%);
    color: #fff;
    pointer-events: none;
}
.hlx-cap a, .hlx-cap h3 { pointer-events: auto; }
.hlx-date {
    display: inline-block; margin-bottom: 6px; padding: 2px 8px;
    font-size: 12px; background: var(--hl-red); border-radius: 3px;
}
.hlx-cap h3 {
    margin: 0 0 4px; font-size: 19px; line-height: 1.35; font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hlx-cap h3 a:hover { color: #ffd54f; }
.hlx-cap p {
    margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.85);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.hlx-arrow {
    position: absolute; top: 40%; z-index: 3;
    width: 38px; height: 38px; margin-top: -19px;
    border: 0; border-radius: 50%;
    background: rgba(255,255,255,.88); color: var(--hl-blue);
    font-size: 15px; cursor: pointer;
    opacity: 0; transition: opacity .25s, background .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hlx-prev { left: 10px; } .hlx-next { right: 10px; }
.hlx-stage:hover .hlx-arrow, .hlx-arrow:focus-visible { opacity: 1; }
.hlx-arrow:hover { background: #fff; transform: scale(1.08); }
.hlx-count {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    padding: 2px 9px; border-radius: 12px;
    background: rgba(0,0,0,.45); color: #fff; font-size: 12px;
}
.hlx-count i { font-style: normal; }
.hlx-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255,255,255,.15); }
.hlx-progress span { display: block; height: 100%; width: 0; background: #ffd54f; }
.hlx-progress span.run { width: 100%; transition-property: width; transition-timing-function: linear; }

.hlx-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.hlx-thumb {
    position: relative; padding: 0; aspect-ratio: 16 / 10;
    border: 2px solid transparent; border-radius: 4px; overflow: hidden;
    background: #dde6ef; cursor: pointer;
    opacity: .6; transition: opacity .2s, border-color .2s;
}
.hlx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hlx-thumb span {
    position: absolute; left: 3px; top: 3px; min-width: 18px; padding: 0 4px;
    font-size: 11px; line-height: 18px; color: #fff; background: rgba(0,0,0,.5); border-radius: 3px;
}
.hlx-thumb:hover { opacity: .9; }
.hlx-thumb.is-active { opacity: 1; border-color: var(--hl-red); }

/* ===== Tabs ===== */
.hlx-right { display: flex; flex-direction: column; min-width: 0; }
.hlx-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--hl-blue); }
.hlx-tab {
    flex: 1 1 0; padding: 9px 6px 8px;
    border: 0; border-radius: 6px 6px 0 0;
    background: var(--hl-bg-soft); color: var(--hl-blue);
    font-size: 13px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
    cursor: pointer; transition: background .2s, color .2s;
}
.hlx-tab:hover { background: #e2edf8; }
.hlx-tab.is-active { background: var(--hl-blue); color: #fff; }
.hlx-tab[data-tab="new"].is-active { background: var(--hl-red); }

.hlx-panel { display: none; margin: 0; padding: 0; list-style: none; flex: 1; }
.hlx-panel.is-active { display: flex; flex-direction: column; animation: hlxFade .3s ease; }
@keyframes hlxFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hlx-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 2px; border-bottom: 1px dashed var(--hl-line);
    flex: 1 1 auto;
}
.hlx-item:last-child { border-bottom: 0; }
.hlx-ithumb { flex: 0 0 110px; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; display: block; }
.hlx-ithumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hlx-item:hover .hlx-ithumb img { transform: scale(1.06); }
.hlx-ithumb + .hlx-num { display: none; }
.hlx-num {
    flex: 0 0 26px; height: 26px; margin-top: 1px;
    border-radius: 50%; background: var(--hl-bg-soft); color: var(--hl-blue);
    font-weight: 700; font-size: 13px; line-height: 26px; text-align: center;
}
.hlx-item:nth-child(2) .hlx-num { background: var(--hl-blue); color: #fff; }
.hlx-item:nth-child(3) .hlx-num { background: #3f86c9; color: #fff; }
.hlx-iline {
    min-width: 0; flex: 1; margin: 0;
    font-size: 14.5px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hlx-ititle { font-weight: 400; color: var(--hl-text); }
.hlx-ititle:hover { color: var(--hl-blue); }
.hlx-item:first-child .hlx-iline { font-size: 15px; -webkit-line-clamp: 4; }
.hlx-idate { margin-left: 2px; font-size: 12.5px; font-style: italic; color: var(--hl-muted); white-space: nowrap; }
.hlx-badge {
    display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 3px;
    font-style: normal; font-size: 11px; line-height: 16px; color: #fff; background: var(--hl-red);
    vertical-align: 1px; animation: hlxBlink 1.6s infinite;
}
@keyframes hlxBlink { 50% { opacity: .55; } }
.hlx-hits { margin-left: 6px; font-size: 12px; color: var(--hl-red); white-space: nowrap; }

/* Màn hình vừa (màn hình nhỏ/laptop 1024–1199) */
@media (max-width: 1199px) {
    .hlx { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
    .hlx-ithumb { flex-basis: 96px; }
    .hlx-cap h3 { font-size: 17px; }
}
/* Dưới 992px xếp chồng (điện thoại vẫn dùng được) */
@media (max-width: 991px) {
    .hlx { grid-template-columns: 1fr; padding: 8px; }
    .hlx-stage { flex: none; }
    .hlx-arrow { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hlx *, .hlx-slide { transition: none !important; animation: none !important; }
}
