/* ==========================================================================
   VNFD Pro – non-visual improvements only
   Giữ nguyên diện mạo Chitvi/Cosmobit (màu, font, bo góc, đổ bóng).
   Chỉ bổ sung: truy cập bàn phím, giảm chuyển động, render chữ, ảnh, in ấn.
   ========================================================================== */

html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; }

/* Accessibility: visible keyboard focus (chỉ hiện khi dùng bàn phím) */
:focus-visible {
    outline: 2px solid var(--dt-pri-color);
    outline-offset: 2px;
}
.skip-link:focus { z-index: 100001; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Print */
@media print {
    .dt__header, .dt__footer, .dt__uptop, .dt_widget-area, .dt__mobilenav { display: none !important; }
    body { color: #000; background: #fff; }
}


/* ==========================================================================
   1. Sticky header: compact bar instead of the large curved shape
   ========================================================================== */
.header--four .dt__navbar-wrapper.is--sticky.on {
    background-color: var(--dt-whi-color);
    box-shadow: 0 6px 24px rgba(30, 30, 42, .12);
}

.header--four .dt__navbar-wrapper.is--sticky.on .site--logo:before,
.header--four .dt__navbar-wrapper.is--sticky.on .dt__navbar-menu:before,
.header--four .dt__navbar-wrapper.is--sticky.on .dt__navbar-menu:after {
    display: none;
    content: none;
}

.header--four .dt__navbar-wrapper.is--sticky.on .dt__navbar-menu {
    max-width: 100%;
    border-radius: 0;
    background-color: transparent;
}

.header--four .dt__navbar-wrapper.is--sticky.on .site--logo {
    min-height: 0;
    padding: .8rem 0;
}

/* ==========================================================================
   2. Accessible text colour (WCAG AA) for primary-coloured text on white
   ========================================================================== */
:root { --dt-pri-text: #d93a2b; }

#content .dt__siteheading .subtitle,
#content .dt__post-category a,
#content .dt__post-entry a:not(.dt-btn):not(.more-link),
#content .entry-content a:not(.dt-btn):not(.wp-block-button__link),
#content .widget a:hover {
    color: var(--dt-pri-text);
}

#content .dt__about--why-two .dt__siteheading .subtitle,
#content .dt__about--why-two a { color: var(--dt-pri-color); }

/* ==========================================================================
   3. Floating chat widget must not hide footer text
   ========================================================================== */
.dt__footer { padding-bottom: 0; }
.dt__footer-copyright { padding-bottom: 7.5rem; }
@media (min-width: 992px) {
    .dt__footer-copyright { padding-bottom: 2rem; }
    .dt__footer .dt__footer-middle { padding-left: 0; }
}

/* ==========================================================================
   5. Font Awesome 4: avoid invisible icons while the font loads
   ========================================================================== */
@font-face {
    font-family: "FontAwesome";
    src: url("../vendors/fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),
         url("../vendors/fonts/fontawesome-webfont.woff?v=4.7.0") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   9. Archive / blog / search: card grid (same card as the homepage)
   ========================================================================== */
.vnfd-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    gap: 3rem;
    align-items: stretch;
}

.dt__post--card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--dt-whi-color);
    box-shadow: 0 0 3.2rem rgba(0, 0, 0, .07);
}

.dt__post--card .dt__post-thumb {
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--dt-gray-high);
}

.dt__post--card .dt__post-img-link { display: block; width: 100%; height: 100%; }

.dt__post--card .dt__post-thumb img,
.dt__post--card .dt__post-noimg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dt__post--card .dt__post-outer {
    flex: 1 1 auto;
    padding: 2.4rem;
}

.dt__post--card .dt__post-title { margin-bottom: 1.2rem; line-height: 1.4; }

.dt__post--card .dt__post-title,
.dt__post--card .dt__post-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dt__post--card .dt__post-title { -webkit-line-clamp: 2; line-clamp: 2; }
.dt__post--card .dt__post-excerpt { -webkit-line-clamp: 3; line-clamp: 3; margin: 0; line-height: 1.6; }

/* ==========================================================================
   10. Mobile safeguards
   ========================================================================== */
.entry-content table, .dt__post-entry table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content iframe, .entry-content video { max-width: 100%; }
@media (max-width: 575px) {
    .vnfd-post-grid { grid-template-columns: 1fr; gap: 2rem; }
    .dt__post--card .dt__post-outer { padding: 2rem; }
}

#content .dt__post-title a { color: var(--dt-sec-color); }
#content .dt__post-title a:hover,
#content .dt__post-title a:focus { color: var(--dt-pri-text); }

/* ==========================================================================
   Card spacing fixes (override .dt__posts--one paddings / margins)
   ========================================================================== */
.dt__posts--one .dt__post.dt__post--card,
.dt__post.dt__post--card {
    padding: 0;
    margin-bottom: 0;
    border-radius: 1rem;
    overflow: hidden;
}

.dt__posts--one .dt__post.dt__post--card .dt__post-thumb,
.dt__post.dt__post--card .dt__post-thumb {
    margin: 0;
}

.dt__post.dt__post--card .dt__post-outer {
    padding: 1.8rem 2rem 2rem;
    margin: 0;
}

.dt__post.dt__post--card .dt__post-entry .dt__post-title {
    margin: 0 0 .8rem;
    font-size: 1.8rem;
    line-height: 1.4;
}

.dt__post.dt__post--card .dt__post-entry .dt__post-excerpt {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.6;
}

/* Title stays dark (beats the generic content-link colour rule) */
#content .dt__post--card .dt__post-entry .dt__post-title a:not(.dt-btn):not(.more-link) {
    color: var(--dt-sec-color);
}

#content .dt__post--card .dt__post-entry .dt__post-title a:not(.dt-btn):not(.more-link):hover,
#content .dt__post--card .dt__post-entry .dt__post-title a:not(.dt-btn):not(.more-link):focus {
    color: var(--dt-pri-text);
}

/* Homepage carousel keeps its floating-card look but with tighter spacing */
.dt__posts--two .dt__post.dt__post--card .dt__post-thumb + .dt__post-outer {
    margin: -3rem 1.5rem 3rem;
    padding: 1.8rem 2rem 2rem;
}
