:root {
      --brand: #8c1d40;
      --brand-dark: #64132e;
      --brand-soft: #f7edf1;
      --ink: #202124;
      --muted: #667085;
      --line: #e5e7eb;
      --paper: #ffffff;
      --page: #f6f7f8;
      --green: #0b7a4b;
      --shadow: 0 14px 38px rgba(17, 24, 39, 0.08);
      --radius: 12px;
      --container: 1180px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: Arial, Helvetica, sans-serif;
      line-height: 1.45;
    }
    img { display: block; max-width: 100%; }
    .article-content img{ margin:0 auto; }
    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; }
    .container { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }
    .advertisement--970x90 {
    position: relative;
    width: 100%;
    max-width: 1170px;
    margin: 20px auto;
    overflow: hidden;
    background: #f3f3f3;
    text-align: center;
}

.advertisement--970x90 a {
    display: block;
}

.advertisement--970x90 img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1170px;
    aspect-ratio: 1170 / 90;
    object-fit: cover;
}

.advertisement__label {
    position: absolute;
    top: 3px;
    right: 5px;
    padding: 2px 5px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .advertisement--970x90 {
        margin: 12px auto;
    }

    .advertisement--970x90 img {
        min-height: 50px;
    }
}
    .top-strip {
      border-bottom: 1px solid var(--line);
      background: #fff;
      font-size: 13px;
      color: var(--muted);
    }
    .top-strip__inner {
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }
    .top-links, .top-meta { display: flex; align-items: center; gap: 18px; }
    .top-links a:hover { color: var(--brand); }
    .dot-live { width: 8px; height: 8px; border-radius: 50%; background: #e11d48; display: inline-block; margin-right: 6px; box-shadow: 0 0 0 4px #ffe4e6; }

    .masthead { padding: 22px 0 16px; background: #fff; }
    .masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
    .brand { display: inline-flex; align-items: center; flex: 0 1 360px; }
    .brand__logo { width: min(90px, 100%); height: auto; object-fit: contain; object-position: left center; }
    .top-date { color: var(--muted); white-space: nowrap; }
    .mast-actions { justify-self: end; display: flex; gap: 10px; }
    .icon-btn {
      width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #333; cursor: pointer;
      display: grid; place-items: center; transition: .2s ease;
    }
    .icon-btn:hover { color: var(--brand); border-color: #d9b3c1; background: var(--brand-soft); }

    .trend-bar { background: #fafafa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .trend-bar__inner { display: flex; align-items: center; gap: 14px; min-height: 42px; overflow: hidden; }
    .trend-label { color: var(--brand); font-weight: 800; white-space: nowrap; font-size: 13px; text-transform: uppercase;z-index:9999;background:#fafafa; }
    .trend-track { display: flex; gap: 22px; min-width: max-content; animation: ticker 32s linear infinite; }
    .trend-track:hover { animation-play-state: paused; }
    .trend-track a { font-size: 14px; color: #414141; }
    .trend-track a::before { content: '#'; color: var(--brand); margin-right: 3px; }
    @keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-48%); } }

    .nav-wrap { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 2px solid var(--brand); box-shadow: 0 4px 15px rgba(0,0,0,.03); }
    .main-nav { display: flex; align-items: center; gap: 4px; min-height: 50px; overflow-x: auto; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a, .main-nav button {
      padding: 15px 11px 13px; white-space: nowrap; font-weight: 700; font-size: 14px; border: 0; background: transparent; cursor: pointer;
    }
    .main-nav a:hover, .main-nav a.active { color: var(--brand); }
    .home-link { color: var(--brand); font-size: 19px !important; }
    .menu-toggle { margin-left: auto; }

    .mega-menu { display: none; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
    .mega-menu.open { display: block; }
    .mega-grid { padding: 24px 0 30px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 22px; }
    .mega-grid h4 { color: var(--brand); margin: 0 0 10px; font-family: Georgia, serif; font-size: 18px; }
    .mega-grid a { display: block; padding: 5px 0; color: var(--muted); font-size: 14px; }
    .mega-grid a:hover { color: var(--brand); }

    .ad-slot { min-height: 104px; margin: 22px auto 24px; border: 1px dashed #c8cdd3; background: linear-gradient(135deg,#f9fafb,#f2f4f7); display: grid; place-items: center; color: #9aa1aa; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }

    .hero-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(230px, .85fr) minmax(250px, .85fr); gap: 22px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
    .hero-main img { aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; }
    .kicker { display: inline-block; margin: 12px 0 6px; color: var(--brand); font-size: 12px; font-weight: 800; text-transform: uppercase; }
    .hero-main h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(29px,3.1vw,45px); line-height: 1.08; letter-spacing: -.55px; }
    .hero-main p { color: var(--muted); font-size: 16px; margin: 13px 0 0; }
    .side-stack { display: grid; gap: 18px; align-content: start; }
    .side-card { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
    .side-card:last-child { border-bottom: 0; }
    .side-card img { aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; margin-bottom: 10px; }
    .side-card h3 { margin: 0; font-family: Georgia, serif; font-size: 20px; line-height: 1.25; }
    .side-card h3:hover, .news-list h3:hover, .section-card h3:hover { color: var(--brand); }

    .latest-panel { border-left: 1px solid var(--line); padding-left: 22px; }
    .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
    .panel-title h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; }
    .panel-title h2::after { content: ''; display: block; width: 46px; height: 3px; background: var(--brand); margin-top: 7px; }
    .tabs { display: flex; gap: 6px; }
    .tab { border: 0; background: #f2f4f7; padding: 6px 9px; border-radius: 999px; cursor: pointer; font-size: 12px; }
    .tab.active { color: #fff; background: var(--brand); }
    .news-list { display: grid; }
    .news-list article { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
    .news-list time { color: var(--brand); font-weight: 800; font-size: 13px; padding-top: 2px; }
    .news-list h3 { margin: 0; font-size: 15.5px; line-height: 1.35; }

    .topic-row { padding: 22px 0; border-bottom: 1px solid var(--line); }
    .topic-row__inner { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; }
    .topic-row__inner::-webkit-scrollbar { display:none; }
    .topic-row strong { white-space: nowrap; color: var(--brand); }
    .topic-chip { padding: 8px 13px; border: 1px solid #e1d5da; background: var(--brand-soft); color: #6f1734; border-radius: 999px; font-size: 13px; white-space: nowrap; }

    .content-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 34px; padding-top: 28px; }
    .section-block { margin-bottom: 38px; }
    .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 2px solid #222; margin-bottom: 18px; }
    .section-heading h2 { margin: 0 0 -2px; padding-bottom: 10px; border-bottom: 4px solid var(--brand); font-family: Georgia, serif; font-size: 28px; }
    .subnav { display: flex; gap: 15px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
    .section-feature { display: grid; grid-template-columns: 1.18fr .82fr; gap: 20px; }
    .section-lead img { aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; }
    .section-lead h3 { font-family: Georgia, serif; font-size: 27px; line-height: 1.17; margin: 10px 0 8px; }
    .section-lead p { margin: 0; color: var(--muted); }
    .section-list { display: grid; gap: 14px; }
    .section-card { display: grid; grid-template-columns: 128px 1fr; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
    .section-card:last-child { border-bottom: 0; }
    .section-card img { aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
    .section-card h3 { margin: 0; font-family: Georgia, serif; font-size: 18px; line-height: 1.26; }
    .meta { margin-top: 8px; color: #8b939d; font-size: 12px; }

    .sidebar { display: grid; align-content: start; gap: 24px; }
    .sidebar-box { border: 1px solid var(--line); padding: 18px; border-radius: 7px; background: #fff; }
    .sidebar-box h3 { margin: 0 0 14px; font-family: Georgia, serif; font-size: 22px; }
    .ranked { counter-reset: ranking; }
    .ranked article { counter-increment: ranking; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .ranked article:last-child { border-bottom: 0; }
    .ranked article::before { content: counter(ranking, decimal-leading-zero); color: var(--brand); font-family: Georgia, serif; font-size: 25px; font-weight: 700; }
    .ranked h4 { margin: 0; font-size: 15px; line-height: 1.35; }
    .newsletter { background: linear-gradient(145deg,var(--brand),var(--brand-dark)); color: white; border: 0; }
    .newsletter p { color: #f2dce5; font-size: 14px; }
    .newsletter form { display: flex; gap: 8px; }
    .newsletter input { min-width: 0; width: 60%;max-width: 100%; border: 0; border-radius: 4px; padding: 11px; }
    .newsletter button { border: 0; border-radius: 4px; padding: 10px 12px; font-weight: 700; color: var(--brand); background: #fff; cursor: pointer; }
    .weather { text-align: center; }
    .weather__temp { font-family: Georgia, serif; font-size: 50px; color: var(--brand); margin: 4px 0; }
    .weather__city { font-weight: 700; }

    .video-strip { background: #161616; color: white; padding: 32px 0 38px; margin-top: 20px; }
    .video-strip .section-heading { border-color: #555; }
    .video-strip .section-heading h2 { color: #fff; }
    .video-grid { display: grid; grid-template-columns: 1.65fr repeat(2, 1fr); gap: 18px; }
    .video-card { position: relative; }
    .video-card img { aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; opacity: .82; }
    .play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(140,29,64,.94); display:grid; place-items:center; font-size: 19px; }
    .video-card h3 { font-family: Georgia, serif; font-size: 19px; margin: 10px 0 0; }
    .video-card:first-child h3 { font-size: 25px; }

    footer { background: #f5f2f3; border-top: 4px solid var(--brand); margin-top: 42px; padding: 35px 0 28px; color: #5d5a5b; }
    .footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 28px; }
    .footer-brand { font-family: Georgia, serif; color: var(--brand); font-size: 34px; font-weight: 800; }
    footer h4 { color: #282325; margin: 0 0 10px; }
    footer a { display: block; padding: 4px 0; font-size: 14px; }
    .copyright { border-top: 1px solid #ded7da; margin-top: 24px; padding-top: 18px; /*font-size: 13px;*/ }

    .search-modal { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.58); display: none; place-items: start center; padding-top: 12vh; }
    .search-modal.open { display: grid; }
    .search-box { width: min(720px,calc(100% - 28px)); background: #fff; border-radius: 12px; box-shadow: 0 28px 75px rgba(0,0,0,.25); padding: 18px; }
    .search-row { display: flex; gap: 10px; }
    .search-row input { width: 100%; padding: 14px 16px; border: 1px solid #d4d8dd; border-radius: 7px; outline: none; }
    .search-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #f8e8ee; }
    .search-row button { border: 0; color: #fff; background: var(--brand); padding: 0 20px; border-radius: 7px; font-weight: 700; cursor: pointer; }
    .search-hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

    @media (max-width: 1020px) {
      .hero-grid { grid-template-columns: minmax(0,1.6fr) minmax(250px,1fr); }
      .latest-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
      .news-list { grid-template-columns: repeat(2,1fr); column-gap: 24px; }
      .content-layout { grid-template-columns: 1fr; }
      .sidebar { grid-template-columns: repeat(3,1fr); }
      .mega-grid { grid-template-columns: repeat(3,1fr); }
    }
    @media (max-width: 760px) {
      .container { width: min(100% - 22px, var(--container)); }
      .top-links { display: none; }
      .masthead__inner { display: flex; }
      .brand { flex-basis: 250px; }
      .brand__logo { width: min(90px, 100%); }
      .hero-grid { grid-template-columns: 1fr; }
      .side-stack { grid-template-columns: repeat(2,1fr); }
      .latest-panel { grid-column: auto; }
      .news-list { grid-template-columns: 1fr; }
      .content-layout { padding-top: 20px; }
      .section-feature { grid-template-columns: 1fr; }
      .sidebar { grid-template-columns: 1fr; }
      .video-grid { grid-template-columns: 1fr 1fr; }
      .video-card:first-child { grid-column: 1/-1; }
      .footer-grid { grid-template-columns: 1fr 1fr; }
      .mega-grid { grid-template-columns: repeat(2,1fr); }
      .subnav { display: none; }
      .ad-slot { min-height: 72px; }
    }
    @media (max-width: 520px) {
      .mast-actions .icon-btn:first-child { display:none; }
      .side-stack { grid-template-columns: 1fr; }
      .section-heading h2 { font-size: 25px; }
      .section-card { grid-template-columns: 104px 1fr; }
      .section-card h3 { font-size: 16px; }
      .video-grid { grid-template-columns: 1fr; }
      .video-card:first-child { grid-column: auto; }
      .footer-grid { grid-template-columns: 1fr; }
      .mega-grid { grid-template-columns: 1fr; }
      .newsletter form { flex-direction: column; }
    }

/* Laravel integration additions */
.brand__fallback { color: var(--brand); font-family: Georgia, serif; font-size: 34px; font-weight: 800; }
.home-page { padding: 0; }
.page-content { padding: 30px 0 48px; }
.alert-wrap { padding-top: 18px; }
.alert { padding: 12px 16px; border: 1px solid #bbf7d0; border-radius: 6px; background: #f0fdf4; color: #166534; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.empty-state { padding: 18px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); background: #fafafa; }
.ad-slot { overflow: hidden; }
.ad-slot img { width: 100%; height: auto; object-fit: cover; }
.ad-slot > a, .ad-html { width: 100%; }
.ad-top { margin-top: 22px; }
.ad-sidebar { margin: 0; min-height: 250px; }
.form-error { display: block; color: #ffe4e6; margin-top: 8px; }
.video-empty { padding: 28px; border: 1px dashed #555; color: #d1d5db; text-align: center; }
.search-results-page { padding-block: 12px 50px; }
.search-summary { color: var(--muted); }
.search-results-list { display: grid; gap: 22px; }
.search-result-card { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.search-result-card img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.search-result-card h2 { margin: 6px 0 8px; font-family: Georgia, serif; font-size: 25px; }
.search-result-card p { margin: 0; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
.pagination a, .pagination span { display: inline-grid; min-width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; }
.pagination .active span { color: #fff; background: var(--brand); border-color: var(--brand); }

@media (max-width: 760px) {
  .search-result-card { grid-template-columns: 120px 1fr; gap: 13px; }
  .search-result-card h2 { font-size: 18px; }
  .search-result-card p { display: none; }
}


/* =========================================================
   FIX TAB "MỚI NHẤT / ĐỌC NHIỀU"
   Thuộc tính hidden có thể bị .news-list { display:grid }
   ghi đè trong CSS tác giả, vì vậy cần ẩn rõ ràng.
   ========================================================= */
.latest-panel [data-news-panel][hidden] {
    display: none !important;
}

.latest-panel [data-news-panel] {
    animation: news-panel-fade .18s ease;
}

.latest-panel .tab {
    transition:
        color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.latest-panel .tab:focus-visible {
    outline: 3px solid rgba(181, 18, 27, .22);
    outline-offset: 2px;
}

@keyframes news-panel-fade {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   THANG CHỮ BIÊN TẬP THEO PHONG CÁCH BÁO ĐIỆN TỬ DÂN TRÍ
   ========================================================= */
:root {
    --editorial-xs: 12px;
    --editorial-sm: 13px;
    --editorial-base: 15px;
    --editorial-md: 16px;
    --editorial-lg: 18px;
    --editorial-xl: 20px;
    --editorial-2xl: 24px;
    --editorial-3xl: 28px;
    --editorial-4xl: 36px;
    --editorial-5xl: 42px;
}

body {
    font-size: var(--editorial-base);
    line-height: 1.5;
}

.top-strip {
    font-size: var(--editorial-sm);
}

.main-nav a,
.main-nav button {
    font-size: 15px;
    line-height: 1.25;
}

.trend-track a {
    font-size: 14px;
}

.hero-main h1 {
    font-size: clamp(30px, 2.8vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.025em;
}

.hero-main p {
    font-size: 15px;
    line-height: 1.55;
}

.side-card h3 {
    font-size: 18px;
    line-height: 1.32;
}

.panel-title h2 {
    font-size: 24px;
    line-height: 1.25;
}

.news-list h3 {
    font-size: 15px;
    line-height: 1.42;
}

.section-heading h2 {
    font-size: 26px;
    line-height: 1.2;
}

.section-lead h3 {
    font-size: 24px;
    line-height: 1.25;
}

.section-lead p {
    font-size: 15px;
    line-height: 1.55;
}

.section-card h3 {
    font-size: 17px;
    line-height: 1.34;
}

.sidebar-box h3 {
    font-size: 21px;
    line-height: 1.25;
}

.ranked h4 {
    font-size: 15px;
    line-height: 1.42;
}

.video-card h3 {
    font-size: 18px;
    line-height: 1.35;
}

.video-card:first-child h3 {
    font-size: 23px;
}

@media (max-width: 1180px) {
    .hero-main h1 {
        font-size: 36px;
    }

    .section-lead h3 {
        font-size: 22px;
    }
}

@media (max-width: 900px) {
    .hero-main h1 {
        font-size: 34px;
    }

    .section-heading h2 {
        font-size: 24px;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 14px;
    }

    .main-nav a,
    .main-nav button {
        font-size: 14px;
    }

    .hero-main h1 {
        font-size: 29px;
        line-height: 1.2;
    }

    .hero-main p {
        font-size: 14px;
    }

    .side-card h3,
    .section-card h3 {
        font-size: 16px;
    }

    .panel-title h2,
    .section-heading h2 {
        font-size: 22px;
    }

    .section-lead h3 {
        font-size: 21px;
    }
}
