/* ============================================================
   TRADA3MIEN — Redesign overrides
   Palette: blue #1e40af, red #dc2626, ink #0f172a, mute #64748b
   ============================================================ */

:root {
    --t3-blue:       #1e40af;
    --t3-blue-600:   #1d4ed8;
    --t3-blue-50:    #eff6ff;
    --t3-red:        #dc2626;
    --t3-red-600:    #b91c1c;
    --t3-ink:        #0f172a;
    --t3-text:       #1f2937;
    --t3-mute:       #64748b;
    --t3-line:       #e5e7eb;
    --t3-bg:         #ffffff;
    --t3-bg-alt:     #f8fafc;
    --t3-font:       'Be Vietnam Pro', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --t3-radius:     8px;
    --t3-shadow:     0 1px 3px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
}

/* ----- Typography ----- */
body,
.font-primary,
.font-secondary {
    font-family: var(--t3-font) !important;
    color: var(--t3-text);
    font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4, h5, h6,
.entry-title h1, .entry-title h2, .entry-title h3, .entry-title h4 {
    font-family: var(--t3-font) !important;
    color: var(--t3-ink);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}
a { color: var(--t3-blue); }
a:hover { color: var(--t3-red); }

/* ----- Header ----- */
#header {
    background: #fff;
    border-bottom: 1px solid var(--t3-line);
}
#header .header-row { align-items: center; }
#logo { padding: 8px 0; }
#logo a {
    display: inline-block;
    line-height: 0;
}
#logo a img,
#logo a .logo-default {
    display: inline-block;
    height: auto;
    max-height: 56px;
    max-width: 100%;
}
#header-wrap {
    background: var(--t3-bg-alt);
    border-top: 1px solid var(--t3-line) !important;
}
.primary-menu .menu-container > .menu-item > .menu-link {
    font-family: var(--t3-font) !important;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--t3-ink);
    padding: 18px 14px;
    position: relative;
}
.primary-menu .menu-container > .menu-item > .menu-link:hover,
.primary-menu .menu-container > .menu-item.current > .menu-link {
    color: var(--t3-red);
}
.primary-menu .menu-container > .menu-item.current > .menu-link::after,
.primary-menu .menu-container > .menu-item:hover > .menu-link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 8px;
    height: 2px;
    background: var(--t3-red);
    border-radius: 2px;
}
.date-today {
    background: var(--t3-blue) !important;
    color: #fff !important;
    font-weight: 500 !important;
}
.header-misc-icon a {
    color: var(--t3-ink);
}
.header-misc-icon a:hover { color: var(--t3-red); }

/* ----- Buttons / chips ----- */
.button, .btn {
    border-radius: var(--t3-radius);
    font-family: var(--t3-font) !important;
    font-weight: 600;
    letter-spacing: .02em;
}
.button-dark, .bg-dark {
    background: var(--t3-ink) !important;
}
.btn.bg-color, .button.bg-color {
    background: var(--t3-blue) !important;
}
.btn.bg-color:hover, .button.bg-color:hover {
    background: var(--t3-blue-600) !important;
}

/* ----- Entry / card ----- */
.entry-title h2 a,
.entry-title h3 a,
.entry-title h4 a {
    color: var(--t3-ink);
    text-decoration: none;
    transition: color .15s ease;
}
.entry-title h2 a:hover,
.entry-title h3 a:hover,
.entry-title h4 a:hover {
    color: var(--t3-blue);
}
.entry-image img {
    border-radius: var(--t3-radius);
    transition: transform .35s ease;
}
.entry-image a:hover img { transform: scale(1.02); }

.entry-meta ul li,
.entry-meta ul li a {
    color: var(--t3-mute);
    font-size: 12px;
}
.entry-meta ul li i { color: var(--t3-blue); }

.entry-categories a {
    background: var(--t3-red) !important;
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.entry-categories a[class*="bg-"]:not(.bg-red):not(.bg-blue) {
    /* keep all dynamic categories on brand */
    background: var(--t3-red) !important;
}

/* Source badge (RSS) */
.t3-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--t3-blue-50);
    color: var(--t3-blue);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid #dbeafe;
}
.t3-source-badge::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--t3-red);
    border-radius: 50%;
    display: inline-block;
}
.t3-source-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--t3-blue), var(--t3-blue-600));
    color: #fff !important;
    border-radius: var(--t3-radius);
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: var(--t3-shadow);
}
.t3-source-readmore:hover {
    transform: translateY(-1px);
    color: #fff !important;
    background: linear-gradient(135deg, var(--t3-red), var(--t3-red-600));
    box-shadow: 0 4px 12px rgba(220, 38, 38, .25);
}
.t3-source-readmore::after { content: "→"; }

.t3-source-block {
    margin: 24px 0 8px;
    padding: 16px 18px;
    background: var(--t3-bg-alt);
    border-left: 3px solid var(--t3-blue);
    border-radius: 6px;
}
.t3-source-block .label {
    display: block;
    color: var(--t3-mute);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.t3-source-block .src-name {
    color: var(--t3-ink);
    font-weight: 700;
}

/* Single line "Nguồn: X" at end of imported article body */
.entry-content .t3-source-line {
    margin: 30px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--t3-line);
    color: var(--t3-mute);
    font-size: 14px;
    font-style: italic;
}
.entry-content .t3-source-line a {
    color: var(--t3-blue);
    text-decoration: none;
    border-bottom: 1px dashed var(--t3-blue);
}
.entry-content .t3-source-line a:hover {
    color: var(--t3-red);
    border-bottom-color: var(--t3-red);
}

/* Cleanup imported figure/caption */
.entry-content figure {
    margin: 20px 0;
    text-align: center;
}
.entry-content figure img { margin: 0 auto; }
.entry-content figcaption,
.entry-content .pic_caption,
.entry-content .picture-caption {
    color: var(--t3-mute);
    font-size: 14px;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

/* ----- Section titles ----- */
nav.navbar h4,
.section h4 {
    color: var(--t3-ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-left: 4px solid var(--t3-red);
    padding-left: 10px;
}

/* ----- Tabs (homepage category nav) ----- */
.nav-pills .nav-link,
.nav .nav-link {
    color: var(--t3-mute) !important;
    font-weight: 600;
    background: transparent !important;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}
.nav .nav-link.active,
.nav-pills .nav-link.active {
    background: var(--t3-blue) !important;
    color: #fff !important;
}
.line.line-dark {
    background: var(--t3-line);
    height: 1px;
    margin: 12px 0 20px;
}

/* ----- Page title (category) ----- */
.page-title {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%) !important;
    padding: 64px 0 !important;
    border-bottom: 4px solid var(--t3-red);
}
.page-title h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -.02em;
}
.page-title span {
    color: rgba(255, 255, 255, .8);
    font-size: 15px;
}
.page-title .breadcrumb {
    background: transparent;
    padding: 0;
}
.page-title .breadcrumb-item,
.page-title .breadcrumb-item a {
    color: rgba(255, 255, 255, .75);
}
.page-title .breadcrumb-item.active { color: #fff; }

/* ----- Single post ----- */
.entry-content img {
    border-radius: var(--t3-radius);
    margin: 16px 0;
    max-width: 100%;
    height: auto;
}
.entry-content p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--t3-text);
    margin-bottom: 18px;
}
.entry-content h2,
.entry-content h3 {
    margin-top: 28px;
    margin-bottom: 14px;
}
.si-sticky .social-icon { margin: 6px 0; }

/* ----- Sidebar widgets ----- */
.widget {
    background: #fff;
    border: 1px solid var(--t3-line);
    border-radius: var(--t3-radius);
    padding: 18px;
    margin-bottom: 22px;
}
.widget h4 {
    border-bottom: 1px solid var(--t3-line);
    padding-bottom: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ----- Footer ----- */
#footer {
    background: var(--t3-ink) !important;
    color: #cbd5e1;
}
#footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
}
#footer h4 {
    color: #fff;
    border-left: 3px solid var(--t3-red);
    padding-left: 10px;
    border-bottom: 0;
}
#footer a { color: #cbd5e1; }
#footer a:hover { color: var(--t3-red); }
#footer .entry-title a { color: #fff !important; }
#footer .tagcloud a {
    background: rgba(255, 255, 255, .05);
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 5px 10px;
    border-radius: 4px;
    margin: 2px;
    font-size: 12px;
    text-transform: lowercase;
}
#footer .tagcloud a:hover {
    background: var(--t3-red);
    color: #fff !important;
    border-color: var(--t3-red);
}
.t3-footer-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 24px;
}
.t3-footer-cats li { padding: 0; margin: 0; }
.t3-footer-cats li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, .08);
    font-size: 14px;
}
.t3-footer-cats li a:hover { color: var(--t3-red); }
.t3-footer-cats li a span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, .04);
    padding: 2px 8px;
    border-radius: 999px;
}

#copyrights {
    background: #000 !important;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, .05);
}
#copyrights a { color: #cbd5e1; }
#copyrights a:hover { color: var(--t3-red); }

/* ----- 404 / search ----- */
.error404 .page-content,
.search .page-content {
    padding: 60px 0;
    text-align: center;
}

/* ----- Latest news list (homepage rows) ----- */
.t3-latest-list { display: flex; flex-direction: column; gap: 18px; }
.t3-latest-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--t3-line);
    align-items: flex-start;
}
.t3-latest-row.t3-hidden { display: none; }
.t3-latest-row:last-child { border-bottom: 0; }
.t3-latest-thumb {
    flex: 0 0 200px;
    display: block;
    border-radius: var(--t3-radius);
    overflow: hidden;
    line-height: 0;
}
.t3-latest-thumb img {
    width: 200px;
    height: 130px;
    object-fit: cover;
    transition: transform .3s ease;
    display: block;
}
.t3-latest-thumb:hover img { transform: scale(1.04); }
.t3-latest-body { flex: 1; min-width: 0; }
.t3-latest-cat {
    display: inline-block;
    background: var(--t3-red);
    color: #fff !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    text-decoration: none;
}
.t3-latest-cat:hover { background: var(--t3-red-600); color: #fff !important; }
.t3-latest-title {
    font-size: 18px;
    line-height: 1.35;
    margin: 0 0 6px;
}
.t3-latest-title a {
    color: var(--t3-ink);
    text-decoration: none;
}
.t3-latest-title a:hover { color: var(--t3-blue); }
.t3-latest-excerpt {
    color: var(--t3-mute);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.t3-latest-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--t3-mute);
    font-size: 12px;
    flex-wrap: wrap;
}
.t3-latest-meta i { color: var(--t3-blue); margin-right: 4px; }

.t3-latest-more-wrap { text-align: center; margin: 24px 0 8px; }
.t3-latest-more-btn {
    background: var(--t3-blue);
    color: #fff;
    border: 0;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    cursor: pointer;
    transition: all .15s ease;
    font-family: var(--t3-font);
    box-shadow: 0 4px 12px rgba(30, 64, 175, .2);
}
.t3-latest-more-btn:hover {
    background: var(--t3-red);
    box-shadow: 0 4px 16px rgba(220, 38, 38, .3);
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .t3-latest-row { flex-direction: column; gap: 10px; }
    .t3-latest-thumb { flex: 0 0 auto; width: 100%; }
    .t3-latest-thumb img { width: 100%; height: 200px; }
    .t3-latest-title { font-size: 16px; }
}

/* ----- Pagination ----- */
.t3-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.t3-pagination a,
.t3-pagination span {
    padding: 8px 14px;
    border: 1px solid var(--t3-line);
    border-radius: 6px;
    color: var(--t3-ink);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s ease;
}
.t3-pagination a:hover {
    background: var(--t3-blue);
    color: #fff;
    border-color: var(--t3-blue);
}
.t3-pagination .current {
    background: var(--t3-red);
    color: #fff;
    border-color: var(--t3-red);
}

/* ----- Misc ----- */
.text-color, .bg-color {
    color: var(--t3-blue);
}
.bg-color { color: #fff; background: var(--t3-blue); }

/* Responsive tweaks */
@media (max-width: 768px) {
    .entry-content p { font-size: 16px; }
    .page-title { padding: 40px 0 !important; }
    #logo a img { max-height: 38px; }
}
