/* Slider trang chủ; không đổi slider trang khác. */
.dts-home-hero, .dts-home-hero .carousel, .dts-home-hero .carousel-inner, .dts-home-hero .carousel-item { height: min(38vw, 520px); max-height: 520px; }
.dts-home-hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.dts-category-hero__toggle { color: #fff; background: transparent; border: 1px solid #fff; border-radius: 4px; padding: 4px 12px; margin-top: 8px; font-size: 14px; line-height: 21px; }
.dts-category-hero__toggle[hidden] { display: none; }
.dts-category-hero__controls { display: none; }
@media (max-width: 768px) {
    .dts-home-hero, .dts-home-hero .carousel, .dts-home-hero .carousel-inner, .dts-home-hero .carousel-item { height: auto; max-height: none; aspect-ratio: 4 / 3; }
}

/* Khung picture giữ ảnh responsive trong đúng chiều cao slider trang chủ hiện có. */
.dts-home-hero .dts-home-hero__picture { display: block; width: 100%; height: 100%; }

/* N: chữ giữa banner, ảnh img phía dưới; khung co giãn theo nội dung để không cắt chữ. */
.dts-category-hero__shell { margin-top: 20px; }
#hero-image.dts-category-hero { position: relative; display: grid; align-items: center; min-height: 360px; height: auto; border-radius: 12px; overflow: hidden; background: #eff8ff; background-image: none; }
/* Ô giữ tỷ lệ cùng hàng với chữ: nội dung dài được tăng chiều cao thay vì bị aspect-ratio ép cắt. */
.dts-category-hero::after { content: ""; grid-area: 1 / 1; width: 100%; aspect-ratio: 2.75 / 1; pointer-events: none; }
.dts-category-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.dts-category-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .55); }
.dts-category-hero__copy { position: relative; z-index: 2; grid-area: 1 / 1; width: 100%; padding: 24px 16px; color: #fff; text-align: center; min-width: 0; overflow-wrap: anywhere; }
#hero-image.dts-category-hero h1 { font-size: 2.25rem; font-weight: 700; }
.dts-category-hero .category-short-desc { max-width: 850px; margin-left: auto; margin-right: auto; color: #fff; font-size: 1.1rem; line-height: 1.6; opacity: 1; }
.dts-category-hero .category-short-desc :is(p, span, a, strong, em) { color: inherit !important; }
.dts-category-hero .category-short-desc > :last-child { margin-bottom: 0; }
#hero-image.dts-category-hero--text-only { min-height: 0; }
.dts-category-hero--text-only::before, .dts-category-hero--text-only::after { display: none; }
.dts-category-hero--text-only .dts-category-hero__copy, .dts-category-hero--text-only .category-short-desc { color: #17334a; }
.dts-category-hero--text-only .dts-category-hero__toggle { color: #002ab0; border-color: #002ab0; }
@media (min-width: 768px) and (max-width: 991.98px) {
    #hero-image.dts-category-hero:not(.dts-category-hero--text-only) { min-height: 320px; }
    .dts-category-hero::after { aspect-ratio: 2.2 / 1; }
}
@media (max-width: 767.98px) {
    #hero-image.dts-category-hero { min-height: 0; }
    .dts-category-hero::after { display: none; }
    #hero-image.dts-category-hero h1 { font-size: 1.5rem; }
    .dts-category-hero .category-short-desc { font-size: 15px; line-height: 1.6; }
    .dts-category-hero__summary--collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
    /* Chừa sẵn chỗ cho nút, tránh nhảy bố cục khi defer JS chạy. */
    .dts-category-hero__controls { display: block; min-height: 45px; }
}

/* K: slider trong khung nội dung, ảnh hiện trọn và chấm điều hướng nằm bên dưới. */
.dts-home-slider-shell { margin-top: 20px; margin-bottom: 20px; }
.dts-home-hero, .dts-home-hero .carousel { height: auto; max-height: none; aspect-ratio: auto; }
.dts-home-hero { border-radius: 12px; overflow: hidden; }
.dts-home-hero .carousel-inner, .dts-home-hero .carousel-item { height: auto; max-height: none; aspect-ratio: 2738 / 1115; }
.dts-home-hero .dts-home-hero__picture { height: auto; }
.dts-home-hero .dts-home-hero__image { display: block; width: 100%; height: auto; object-fit: contain; }
.dts-home-hero .dts-home-hero__indicators { position: static; height: 24px; margin: 4px 0; gap: 8px; align-items: center; }
.dts-home-hero .dts-home-hero__indicators button { width: 8px; height: 8px; border: 0; border-radius: 50%; background-color: #002ab0; margin: 0; }
.dts-home-hero .carousel-control-prev, .dts-home-hero .carousel-control-next { top: auto; bottom: 44px; width: 32px; height: 32px; opacity: .85; background: rgba(0, 20, 80, .45); border-radius: 50%; }
.dts-home-hero .carousel-control-prev { left: 8px; }
.dts-home-hero .carousel-control-next { right: 8px; }
.dts-home-hero .carousel-control-prev-icon, .dts-home-hero .carousel-control-next-icon { width: 20px; height: 20px; background-color: transparent !important; }
@media (max-width: 768px) {
    .dts-home-hero .carousel-inner, .dts-home-hero .carousel-item { aspect-ratio: 4 / 3; }
}

/* P: nút theo giữa khung ảnh, độc lập với hàng chấm chỉ số bên dưới. */
.dts-home-hero .carousel-control-prev, .dts-home-hero .carousel-control-next { position: absolute; top: 50%; bottom: auto; transform: translateY(-50%); width: 40px; height: 40px; z-index: 3; }
.dts-home-hero .carousel-control-prev { left: 16px; }
.dts-home-hero .carousel-control-next { right: 16px; }
.dts-home-hero .carousel-control-prev:hover, .dts-home-hero .carousel-control-next:hover,
.dts-home-hero .carousel-control-prev:focus-visible, .dts-home-hero .carousel-control-next:focus-visible { opacity: 1; background-color: rgba(0, 20, 80, .8); }
.dts-home-hero .carousel-control-prev:focus-visible, .dts-home-hero .carousel-control-next:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #002ab0; }
@media (max-width: 768px) {
    .dts-home-hero .carousel-control-prev, .dts-home-hero .carousel-control-next { width: 32px; height: 32px; }
    .dts-home-hero .carousel-control-prev { left: 8px; }
    .dts-home-hero .carousel-control-next { right: 8px; }
}
