.hvd-training-notices {
    --hvd-course-color: #0c6fd1;
    --hvd-exam-color: #084f9e;
    --hvd-border-color: #e3e8ef;
    --hvd-text-color: #172033;
    --hvd-muted-color: #657083;
    --hvd-desktop-columns: 3;
    --hvd-desktop-gap: 28px;
    --hvd-tablet-columns: 1;
    --hvd-tablet-gap: 0px;
    --hvd-mobile-columns: 1;
    --hvd-mobile-gap: 0px;
    width: 100%;
}

.hvd-training-notices,
.hvd-training-notices * {
    box-sizing: border-box;
}

.hvd-training-notices__heading {
    margin: 0 0 24px;
    color: var(--hvd-text-color);
}

.hvd-training-notices__list {
    display: grid;
    gap: 18px;
}

.hvd-training-card {
    --hvd-accent: var(--hvd-course-color);
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-height: 142px;
    padding: 20px 24px 20px 20px;
    overflow: hidden;
    border: 1px solid var(--hvd-border-color);
    border-top: 5px solid var(--hvd-accent);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(14, 43, 79, 0.08);
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.hvd-training-card--exam {
    --hvd-accent: var(--hvd-exam-color);
}

.hvd-training-card::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 180px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hvd-accent) 5%, white));
    pointer-events: none;
    transition: opacity 220ms ease, width 220ms ease;
}

.hvd-training-card__date {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100px;
    padding: 11px 8px 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--hvd-accent) 8%, white);
    color: var(--hvd-accent);
    text-align: center;
    transition: box-shadow 220ms ease, transform 220ms ease;
}

/* Nhãn trong ô ngày khóa học; kế thừa màu đỏ khi khai giảng vào Chủ nhật. */
.hvd-training-card__date-label {
    display: block;
    max-width: 100%;
    margin-bottom: 6px;
    color: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.hvd-training-card__day {
    display: block;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    line-height: 0.95;
}

.hvd-training-card__month {
    display: block;
    margin-top: 7px;
    color: var(--hvd-text-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.hvd-training-card__year {
    display: block;
    margin-top: 3px;
    color: var(--hvd-muted-color);
    font-size: 12px;
    line-height: 1;
}

.hvd-training-card__date--sunday {
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: #fff1f2;
    color: #dc2626;
}

.hvd-training-card__date--sunday .hvd-training-card__month,
.hvd-training-card__date--sunday .hvd-training-card__year {
    color: #dc2626;
}

.hvd-training-card__body,
.hvd-training-card__action {
    position: relative;
    z-index: 1;
}

.hvd-training-card__kind {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--hvd-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hvd-training-card__kind span {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hvd-accent);
    color: #fff;
    font-size: 12px;
}

.hvd-training-card__title {
    margin: 0 0 9px;
    color: var(--hvd-text-color);
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 700;
    line-height: 1.25;
    transition: color 220ms ease;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .hvd-training-card:not(.hvd-training-card--empty):hover,
    .hvd-training-card:not(.hvd-training-card--empty):focus-within {
        border-color: color-mix(in srgb, var(--hvd-accent) 52%, var(--hvd-border-color));
        border-top-color: var(--hvd-accent);
        box-shadow: 0 14px 34px color-mix(in srgb, var(--hvd-accent) 16%, transparent);
        transform: translateY(-4px);
    }

    .hvd-training-card:not(.hvd-training-card--empty):hover::after,
    .hvd-training-card:not(.hvd-training-card--empty):focus-within::after {
        width: 240px;
        opacity: 0.95;
    }

    .hvd-training-card:not(.hvd-training-card--empty):hover .hvd-training-card__date,
    .hvd-training-card:not(.hvd-training-card--empty):focus-within .hvd-training-card__date {
        box-shadow: 0 6px 16px color-mix(in srgb, var(--hvd-accent) 15%, transparent);
        transform: scale(1.035);
    }

    .hvd-training-card:not(.hvd-training-card--empty):hover .hvd-training-card__title,
    .hvd-training-card:not(.hvd-training-card--empty):focus-within .hvd-training-card__title {
        color: var(--hvd-accent);
    }
}

.hvd-training-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 18px;
    color: var(--hvd-muted-color);
    font-size: 14px;
    line-height: 1.5;
}

.hvd-training-card__meta-item strong {
    color: var(--hvd-text-color);
    font-weight: 600;
}

.hvd-training-card__meta-item--format {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hvd-training-card__status {
    margin-top: 7px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.hvd-training-card__status--green { color: #16a34a; }
.hvd-training-card__status--blue { color: #0c6fd1; }
.hvd-training-card__status--orange { color: #d97706; }
.hvd-training-card__status--red { color: #dc2626; }
.hvd-training-card__status--gray { color: #64748b; }

.hvd-training-card__action {
    display: flex;
    min-width: 156px;
    justify-content: flex-end;
}

.hvd-training-card__button {
    display: inline-flex;
    min-height: 46px;
    padding: 11px 20px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--hvd-accent);
    border-radius: 999px;
    background: var(--hvd-accent);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.hvd-training-card__button:hover,
.hvd-training-card__button:focus-visible {
    background: #fff;
    color: var(--hvd-accent) !important;
    box-shadow: 0 7px 20px color-mix(in srgb, var(--hvd-accent) 22%, transparent);
    transform: translateY(-1px);
}

.hvd-training-card__button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--hvd-accent) 32%, transparent);
    outline-offset: 3px;
}

.hvd-training-card--empty {
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 112px;
    background: #fbfcfe;
    box-shadow: none;
}

.hvd-training-card__empty-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hvd-accent) 10%, white);
    color: var(--hvd-accent);
    font-size: 24px;
    font-weight: 800;
}

.hvd-training-card__empty-text {
    margin: 0;
    color: var(--hvd-muted-color);
    font-size: 15px;
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .hvd-training-card::after { background: linear-gradient(90deg, transparent, #f6f9fd); }
    .hvd-training-card__date,
    .hvd-training-card__empty-icon { background: #eef6ff; }
    .hvd-training-card__button:hover,
    .hvd-training-card__button:focus-visible { box-shadow: 0 7px 20px rgba(12, 111, 209, 0.2); }
}

@media (max-width: 767px) {
    .hvd-training-notices__list {
        gap: 14px;
    }

    .hvd-training-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
        min-height: 0;
        padding: 16px;
        border-top-width: 4px;
        border-radius: 12px;
    }

    .hvd-training-card::after {
        width: 100px;
    }

    .hvd-training-card__date {
        min-height: 88px;
        padding: 9px 5px;
    }

    .hvd-training-card__day {
        font-size: 32px;
    }

    .hvd-training-card__month,
    .hvd-training-card__year {
        font-size: 10px;
    }

    .hvd-training-card__kind {
        font-size: 10px;
        letter-spacing: 0.025em;
    }

    .hvd-training-card__kind span {
        width: 19px;
        height: 19px;
        font-size: 10px;
    }

    .hvd-training-card__title {
        margin-bottom: 7px;
        font-size: 18px;
    }

    .hvd-training-card__meta {
        display: grid;
        gap: 3px;
        font-size: 13px;
    }

    .hvd-training-card__status {
        font-size: 13px;
    }

    .hvd-training-card__action {
        grid-column: 1 / -1;
        min-width: 0;
        justify-content: flex-end;
    }

    .hvd-training-card__button {
        width: auto;
        min-height: 44px;
    }

    .hvd-training-card--empty {
        grid-template-columns: 54px minmax(0, 1fr);
        padding-block: 18px;
    }

    .hvd-training-card__empty-icon {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hvd-training-card__button {
        transition: none;
    }
}

/* Slider thông báo thu gọn theo mẫu lịch VUTC. */
.hvd-training-slider {
    position: relative;
    min-width: 0;
    padding: 0 36px;
}

.hvd-training-slider__viewport {
    width: 100%;
    margin-block: -6px -10px;
    padding-block: 6px 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.hvd-training-slider__viewport::-webkit-scrollbar {
    display: none;
}

.hvd-training-slider__viewport:focus-visible {
    border-radius: 12px;
    outline: 3px solid rgba(12, 111, 209, 0.24);
    outline-offset: 3px;
}

.hvd-training-slider__track {
    display: grid;
    grid-auto-columns: calc((100% - var(--hvd-desktop-gap)) / var(--hvd-desktop-columns));
    grid-auto-flow: column;
    gap: 14px;
}

.hvd-training-slider .hvd-training-card {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 118px;
    height: 100%;
    padding: 12px;
    border-top-width: 4px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(14, 43, 79, 0.08);
    scroll-snap-align: start;
}

.hvd-training-slider .hvd-training-card__date {
    min-height: 82px;
    padding: 8px 5px;
    border-radius: 10px;
}

.hvd-training-slider .hvd-training-card__day {
    font-size: 31px;
}

.hvd-training-slider .hvd-training-card__month,
.hvd-training-slider .hvd-training-card__year {
    font-size: 10px;
}

.hvd-training-slider .hvd-training-card__month {
    margin-top: 5px;
}

.hvd-training-slider .hvd-training-card__title {
    margin-bottom: 6px;
    font-size: clamp(16px, 1.45vw, 19px);
    line-height: 1.22;
}

.hvd-training-slider .hvd-training-card__meta {
    display: grid;
    gap: 1px;
    font-size: 12px;
    line-height: 1.35;
}

.hvd-training-slider .hvd-training-card__status {
    margin-top: 5px;
    font-size: 13px;
}

.hvd-training-slider .hvd-training-card__action {
    min-width: 90px;
}

.hvd-training-slider .hvd-training-card__button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
}

/* Thẻ kỳ thi sát hạch: bố cục riêng theo mẫu VUTC. */
.hvd-training-slider .hvd-exam-card {
    display: flex;
    min-height: 360px;
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top-width: 4px;
}

.hvd-exam-card__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.hvd-exam-card__title {
    min-width: 0;
    margin: 0;
    color: var(--hvd-text-color);
    font-size: clamp(18px, 1.65vw, 22px);
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    transition: color 220ms ease;
}

.hvd-exam-card__status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #0c6fd1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.hvd-exam-card__status--green { color: #16a34a; }
.hvd-exam-card__status--blue { color: #0c6fd1; }
.hvd-exam-card__status--orange { color: #d97706; }
.hvd-exam-card__status--red { color: #dc2626; }
.hvd-exam-card__status--gray { color: #64748b; }

.hvd-exam-card__venue,
.hvd-exam-card__datetime,
.hvd-exam-card__room,
.hvd-exam-card__action {
    position: relative;
    z-index: 1;
}

.hvd-exam-card__venue {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    margin-top: 30px;
    color: var(--hvd-muted-color);
}

.hvd-exam-card__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    color: #778294;
}

.hvd-exam-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.hvd-exam-card__venue-name {
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hvd-exam-card__address {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.hvd-exam-card__datetime {
    display: flex;
    flex-wrap: wrap;
    gap: 11px 22px;
    margin-top: 30px;
    color: var(--hvd-muted-color);
    font-size: 14px;
    line-height: 1.4;
}

.hvd-exam-card__datetime > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hvd-exam-card__room {
    position: relative;
    margin-top: 20px;
    padding-top: 17px;
    color: var(--hvd-muted-color);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.hvd-exam-card__room::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: rgba(23, 32, 51, 0.2);
    box-shadow: inset 0 1px 1px rgba(23, 32, 51, 0.18), 0 1px 1px rgba(255, 255, 255, 0.9);
}

.hvd-exam-card__action {
    display: flex;
    width: 100%;
    margin-top: auto;
    padding-top: 24px;
}

.hvd-exam-card__action:empty {
    display: none;
}

.hvd-exam-card__button {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    align-items: center;
    justify-content: center;
    border: 2px solid #00aeef;
    border-radius: 6px;
    background: #00aeef;
    color: #fff !important;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hvd-exam-card__button:hover,
.hvd-exam-card__button:focus-visible {
    border-color: #0c6fd1;
    background: #0c6fd1;
    box-shadow: 0 8px 20px rgba(12, 111, 209, 0.28);
    color: #fff !important;
    transform: translateY(-2px);
}

.hvd-exam-card__button:focus-visible {
    outline: 3px solid rgba(12, 111, 209, 0.25);
    outline-offset: 3px;
}

.hvd-exam-card__button--disabled,
.hvd-exam-card__button--disabled:hover {
    border-color: #f0f2f5;
    background: #f0f2f5;
    box-shadow: none;
    color: #a2aab7 !important;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .hvd-exam-card:hover .hvd-exam-card__title,
    .hvd-exam-card:focus-within .hvd-exam-card__title {
        color: var(--hvd-exam-color);
    }
}

@media (min-width: 1025px) {
    .hvd-training-notices--desktop-compact .hvd-training-slider .hvd-training-card {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .hvd-training-notices--desktop-compact .hvd-training-slider .hvd-training-card__date {
        grid-row: 1 / span 2;
    }

    .hvd-training-notices--desktop-compact .hvd-training-slider .hvd-training-card__body,
    .hvd-training-notices--desktop-compact .hvd-training-slider .hvd-training-card__action {
        grid-column: 2;
    }

    .hvd-training-notices--desktop-compact .hvd-training-slider .hvd-training-card__action {
        min-width: 0;
        justify-content: flex-end;
    }
}

.hvd-training-slider__button {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: inline-flex;
    width: 30px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hvd-border-color);
    border-radius: 999px;
    background: #fff;
    color: #0c6fd1;
    box-shadow: 0 5px 16px rgba(14, 43, 79, 0.12);
    font: inherit;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.hvd-training-slider__button:hover,
.hvd-training-slider__button:focus-visible {
    background: #0c6fd1;
    color: #fff;
}

.hvd-training-slider__button:focus-visible {
    outline: 3px solid rgba(12, 111, 209, 0.24);
    outline-offset: 2px;
}

.hvd-training-slider__button--prev { left: 0; }
.hvd-training-slider__button--next { right: 0; }

.hvd-training-slider--static {
    padding-inline: 0;
}

.hvd-training-slider--static .hvd-training-slider__button {
    display: none;
}

@media (max-width: 1024px) {
    .hvd-training-slider__track {
        grid-auto-columns: calc((100% - var(--hvd-tablet-gap)) / var(--hvd-tablet-columns));
    }
}

@media (max-width: 767px) {
    .hvd-training-slider {
        padding-inline: 27px;
    }

    .hvd-training-slider__track {
        grid-auto-columns: calc((100% - var(--hvd-mobile-gap)) / var(--hvd-mobile-columns));
    }

    .hvd-training-slider .hvd-training-card {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 11px;
        min-height: 0;
        padding: 12px;
    }

    .hvd-training-slider .hvd-training-card__date {
        min-height: 80px;
    }

    .hvd-training-slider .hvd-training-card__day {
        font-size: 28px;
    }

    .hvd-training-slider .hvd-training-card__title {
        font-size: 16px;
    }

    .hvd-training-slider .hvd-training-card__meta,
    .hvd-training-slider .hvd-training-card__status {
        font-size: 12px;
    }

    .hvd-training-slider .hvd-training-card__action {
        grid-column: 1 / -1;
        min-width: 0;
        justify-content: flex-end;
    }

    .hvd-training-slider .hvd-training-card__button {
        width: auto;
        min-height: 38px;
    }

    .hvd-training-slider .hvd-exam-card {
        display: flex;
        min-height: 350px;
        padding: 18px;
    }

    .hvd-exam-card__header {
        gap: 10px;
    }

    .hvd-exam-card__title {
        font-size: 18px;
    }

    .hvd-exam-card__status {
        max-width: 46%;
        font-size: 13px;
        text-align: center;
        white-space: normal;
    }

    .hvd-exam-card__venue,
    .hvd-exam-card__datetime {
        margin-top: 24px;
    }

    .hvd-exam-card__venue-name,
    .hvd-exam-card__room {
        font-size: 14px;
    }

    .hvd-exam-card__datetime {
        font-size: 13px;
    }

    .hvd-exam-card__button {
        width: 100%;
        min-height: 46px;
        font-size: 15px;
    }

    .hvd-training-slider__button {
        width: 24px;
        height: 38px;
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hvd-training-card,
    .hvd-training-card::after,
    .hvd-training-card__date,
    .hvd-training-card__title,
    .hvd-training-slider__viewport {
        scroll-behavior: auto;
        transition: none;
    }

    .hvd-training-slider__button {
        transition: none;
    }

    .hvd-exam-card__button {
        transition: none;
    }
}
