/* =========================================================
   GIAO DIỆN KIỂU NHK NEWS WEB (Nhật Bản) - nội dung tiếng Việt
   Tông màu: Trắng - Đỏ NHK (#e50012) - Xám đậm chữ
   ========================================================= */

:root{
    --nhk-red: #e50012;
    --nhk-red-dark: #b8000e;
    --nhk-black: #1a1a1a;
    --nhk-gray-text: #333333;
    --nhk-gray-muted: #767676;
    --nhk-border: #e2e2e2;
    --nhk-bg: #f4f4f4;
}

*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Segoe UI", Roboto, Arial, sans-serif;
}
body{
    background-color: var(--nhk-bg);
    width: 100%;
    min-height: 100vh;
    scroll-behavior: smooth;
    color: var(--nhk-gray-text);
    line-height: 1.6;
}
a{ color: inherit; }
.container{
    margin: auto;
    width: 1080px;
    max-width: 100%;
    padding: 0 10px;
}
header{
    width: 100%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ============ THANH TIỆN ÍCH TRÊN CÙNG (giống thanh trên NHK) ============ */
.navbar.bg-light{
    background: var(--nhk-black) !important;
    padding: 4px 0;
    font-size: 12px;
}
.navbar.bg-light .nav-item{
    color: #cfcfcf;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.navbar.bg-light i{
    color: var(--nhk-red);
    font-size: 15px;
}
.navbar.bg-light .btn{
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    border: none;
}
.navbar.bg-light .btn-success{
    background: var(--nhk-red) !important;
    color: #fff;
}
.navbar.bg-light .btn-primary{
    background: transparent !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

/* ============ THANH LOGO + MASTHEAD KIỂU NHK ============ */
.navbar.navbar-dark.bg-dark{
    background: #fff !important;
    border-bottom: 4px solid var(--nhk-red);
    padding: 14px 0 6px 0;
}
.navbar.navbar-dark .navbar-brand img{
    height: 34px;
    filter: none;
}
.navbar.navbar-dark .navbar-brand{
    position: relative;
    padding-left: 14px;
    border-left: 6px solid var(--nhk-red);
}
.navbar.navbar-dark .navbar-toggler{
    border-color: var(--nhk-red);
}
.navbar.navbar-dark .navbar-toggler-icon{
    filter: invert(14%) sepia(88%) saturate(6000%) hue-rotate(350deg);
}
.header-menu,
.navbar-nav{
    list-style: none;
}
@media (min-width: 992px){
    #navbarSupportedContent{
        display: flex !important;
        align-items: center;
    }
    .main-nav-spread{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex: 1 1 auto;
    }
}
.btn-login{
    display: inline-block;
    background: var(--nhk-red);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    padding: 8px 24px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-login:hover{
    background: var(--nhk-red-dark);
    color: #fff !important;
}
.navbar.navbar-dark .nav-link[href="#"]{
    cursor: default;
    font-weight: 600;
}
.btn-login.btn-logout{
    background: var(--nhk-black);
}
.btn-login.btn-logout:hover{
    background: #333;
}
.navbar.navbar-dark .nav-link{
    color: var(--nhk-gray-text) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.navbar.navbar-dark .nav-link:hover,
.navbar.navbar-dark .nav-link.active{
    color: var(--nhk-red) !important;
    border-bottom: 3px solid var(--nhk-red);
}
.navbar.navbar-dark .dropdown-menu{
    border-radius: 0;
    border-color: var(--nhk-border);
}
.navbar.navbar-dark .dropdown-item:hover{
    background: var(--nhk-red);
    color: #fff;
}
@media (min-width: 992px){
    .navbar.navbar-dark .dropdown:hover > .dropdown-menu{
        display: block;
        margin-top: 0;
    }
}

/* ============ Ô KHẨU HIỆU / TICKER TIN TỨC (giống dải "NEWS WEB" đỏ của NHK) ============ */
.header-slogan{
    background: var(--nhk-red);
    border-bottom: none;
    margin-top: 0;
    padding: 0;
}
.header-slogan .container{
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}
.header-slogan .svg{
    position: relative;
    padding: 8px 18px;
    background: var(--nhk-black);
    margin-right: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}
.header-slogan .svg::after{
    display: none;
}
.header-slogan .text{
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ LƯỚI TIN NỔI BẬT (khu vực trang chủ, kiểu NHK top stories) ============ */
.tinnoibat{
    background: #fff;
    padding: 16px 0;
    border-bottom: 1px solid var(--nhk-border);
}
.layout{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 200px 50px 200px;
    grid-gap: 4px;
}
.layout-item{
    position: relative;
    text-decoration: none;
    border-radius: 0;
    background: var(--nhk-black);
    overflow: hidden;
    display: block;
}
.layout-item:first-child{
    grid-column: 1/3;
    grid-row: 1/2;
}
.layout-item:nth-child(2),
.layout-item:nth-child(3){
    grid-row: 1/3;
}
.layout-item:nth-child(4),
.layout-item:nth-child(5){
    grid-row: 2/4;
}
.layout-item:last-child{
    grid-column: 3/5;
}
.layout-item::before{
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 65%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    z-index: 1;
}
.layout-item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    filter: brightness(0.92);
    transition: transform 0.4s;
}
.layout-item:hover img{
    transform: scale(1.05);
}
.layout-item h3{
    position: absolute;
    z-index: 2;
    left: 12px;
    right: 12px;
    bottom: 10px;
    transform: none;
    width: auto;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-line-clamp: 2;
    font-size: 17px;
    line-height: 140%;
}
.layout-item h3::before{
    content: "TIN NỔI BẬT";
    display: block;
    color: var(--nhk-red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* ============ KHUNG "TIN TỨC TRONG NGÀY" (trang chủ) ============ */
.title{
    padding: 10px 0;
    border-bottom: 3px solid var(--nhk-red);
    margin-bottom: 4px;
}
h2.motaLT{
    font-size: 16px;
    line-height: 160%;
    border-bottom: 1px solid var(--nhk-border);
    padding: 16px 0;
    color: var(--nhk-gray-muted);
    font-style: normal;
}
.categoryNews{
    background: #fff;
    padding: 16px;
    border: 1px solid var(--nhk-border);
}
.categoryNews .title{
    border-bottom: none;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
}
.categoryNews .title b{
    background: transparent;
    color: var(--nhk-black);
    font-size: 19px;
    font-weight: 800;
    padding: 0;
    position: relative;
    padding-left: 12px;
    border-left: 5px solid var(--nhk-red);
}
.news{
    text-decoration: none;
    color: var(--nhk-black);
    font-size: 18px;
    font-weight: 700;
    line-height: 140%;
}
.news:hover{
    color: var(--nhk-red);
    text-decoration: underline;
}
.mottin {
    display: grid;
    grid-template-columns: 200px auto;
    grid-template-rows: auto;
    min-height: 150px;
    grid-gap: 0 16px;
    border-bottom: 1px solid var(--nhk-border);
    overflow: hidden;
    padding-bottom: 14px;
    margin-bottom: 14px !important;
}
.mottin:last-child{
    border-bottom: none;
}
.hinhcuatin img,
.mottin img{
    border-radius: 0 !important;
    border: none !important;
    height: 130px;
    object-fit: cover;
}
.news-content p.TomTat,
.news-content p{
    margin-top: 6px;
    font-size: 14px;
    font-weight: 400;
    color: var(--nhk-gray-muted);
    text-align: left;
    height: auto;
    max-height: 66px;
    overflow: hidden;
}
.news-content .typeOfName{
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    background: var(--nhk-red);
    padding: 2px 8px;
    letter-spacing: 0.5px;
}
.news-content .date-out{
    font-style: normal;
    font-size: 12px;
    color: var(--nhk-gray-muted);
}

/* ============ KHỐI QUẢNG CÁO / STAY CONNECTED (cột phải) ============ */
.advertisement{
    position: sticky;
    background: #fff;
    top: 10px;
    border: 1px solid var(--nhk-border);
}
.advertisement .title{
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    background: var(--nhk-black);
    padding: 10px 14px;
    border-bottom: 3px solid var(--nhk-red);
}
.advertisement .content{
    background: #fff;
    box-shadow: none;
    padding: 10px;
}
.advertisement .postAdv img{
    width: 100%;
}
.advertisement .postAdv .title{
    background: var(--nhk-red);
    text-align: center;
    padding: 6px;
    margin-bottom: 6px;
    border-bottom: none;
}

/* ============ TRANG CHI TIẾT TIN ============ */
.listNewAnnAd{
    background: #fff;
    padding: 20px;
    border: 1px solid var(--nhk-border);
    margin-bottom: 16px;
}
.categoryNews-header{
    border-bottom: 1px solid var(--nhk-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.categoryNews-header h1{
    font-size: 26px;
    font-weight: 800;
    line-height: 140%;
    color: var(--nhk-black);
}
h2.motatin{
    font-size: 16px;
    line-height: 170%;
    margin-top: 10px;
    text-align: left;
    color: var(--nhk-gray-muted);
    font-weight: 500;
}
.infor-1{
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--nhk-gray-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.infor-1 a{
    text-decoration: none;
    color: #fff;
    background: var(--nhk-red);
    padding: 3px 10px;
    letter-spacing: 0.5px;
}
.infor-1 .author{
    color: var(--nhk-red);
}
.socails{
    margin-top: 14px;
}
.socails button{
    border: 1px solid var(--nhk-border);
    outline: none;
    border-radius: 2px;
    padding: 5px 12px;
    background: #fff;
    color: var(--nhk-gray-text);
    font-size: 13px;
    margin-right: 6px;
    cursor: pointer;
}
.socails button:hover{
    background: var(--nhk-red);
    color: #fff;
    border-color: var(--nhk-red);
}
.contentct{
    position: relative;
    text-align: left;
    font-size: 17px;
    padding-bottom: 10px;
    line-height: 175%;
    margin-bottom: 10px;
    color: var(--nhk-gray-text);
}
.contentct img{
    margin: 10px auto;
    width: 100%;
    height: auto;
    display: block;
}
.btn {
    padding: 3px 10px;
    font-size: 14px;
    border-radius: 2px;
}
.related-Posts-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 3px solid var(--nhk-red);
}
.related-Posts-header h3 {
    position: relative;
    padding: 0 0 0 12px;
    font-size: 18px;
    font-weight: 800;
}
.related-Posts-header h3::before {
    position: absolute;
    display: block;
    content: "";
    width: 5px;
    height: 100%;
    top: 0px;
    left: 0px;
    background: var(--nhk-red);
}
.related-Posts_list {
    margin-top: 0px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 14px;
}
.card {
    text-decoration: none;
    color: var(--nhk-black);
    box-shadow: none;
    border: 1px solid var(--nhk-border);
    height: 260px;
    display: block;
}
.card:hover{
    border-color: var(--nhk-red);
}
.card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.card-txt {
    padding: 10px 8px;
}
.card span {
    font-weight: 600;
    margin: 0;
}
.card-title {
    display: block;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-line-clamp: 2;
    height: 45px;
    font-size: 14px;
    font-weight: 700;
}

.card-date {
    font-size: 12px;
    padding: 2px 6px;
    background: var(--nhk-bg);
    color: var(--nhk-gray-muted);
    border-radius: 0;
    letter-spacing: 0.5px;
}

/* ============ TÌM KIẾM ============ */
.header-utilities {
    position: relative;
}
.search {
    position: absolute;
    top: 50px;
    right: -700px;
    width: 480px;
    padding: 10px;
    border-radius: 0;
    border: 2px solid var(--nhk-red);
    transition: all 0.6s;
}
.search.active {
    transition: all 0.6s;
    right: 40px;
}
.search-area {
    display: none;
}
.search-area.active {
    display: block;
}
.search-area{
    position: absolute;
    top: 100px;
    right: 40px;
    width: 500px;
    padding-bottom: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px 2px rgba(0, 0, 0, 0.15) ;
    border-top: 3px solid var(--nhk-red);
    z-index: 10;
    display: none;
  }
  .search-area h4{
      padding: 8px;
      text-align: center;
      font-size: 15px;
      font-weight: 700;
      background: var(--nhk-bg);
  }
  .search-area.active{
      display: block;
  }
  .list-Search{
      list-style: none;
      padding: 10px;
      margin: 0;
      max-height: 300px;
      overflow: auto;
  }
  .list-Search::-webkit-scrollbar{
      width: 2px;
  }

  .list-Search .item{
       display: flex;
       padding: 6px 0;
       color: var(--nhk-gray-text);
       border-bottom: 1px solid var(--nhk-border);
  }
  .list-Search .item img{
      height:50px;
      width: 60px;
      margin-right: 8px;
      object-fit: cover;
  }
  .list-Search .item h6,span{
      margin: 0;
       display: block;
       display: -webkit-box;
       -webkit-box-orient: vertical;
       overflow: hidden;
       text-overflow: ellipsis;
       white-space: normal;
       -webkit-line-clamp: 1;
  }

  /* ============ FORM (đăng ký / liên hệ) ============ */
  label{
    width: 100px;
    font-weight: 700;
}
.container.form{
    width:540px;
    background:#fff ;
    padding:0 0 10px 0;
    border-radius:0;
    border: 1px solid var(--nhk-border) !important;
    box-shadow: none;
}
.container.form h2{
    padding: 12px;
    font-size: 20px;
    text-align: center;
    background: var(--nhk-black);
    color: #fff;
    border-radius: 0;
    letter-spacing: 1px;
}
.container.form a{
    margin-top: 50px;
    color: var(--nhk-red);
}
.form-line{
    display: flex;
    align-items: center;
   margin: 5px 0;
   padding: 0 12px;
}
.form-line.active{
    flex-wrap: wrap;
}
.form-line input{
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border:  1px solid var(--nhk-border);
    border-radius: 2px;
}
.form-line button{
    height: 36px;
    min-width: 100px;
    margin-left: 3px;
}
.btn-success{
    background: var(--nhk-red) !important;
    border-color: var(--nhk-red) !important;
}
.form-line input[type=checkbox],
.form-line input[type=radio]{
    height: 16px;
    margin-left: 20px;
    width: 16px;
}
.form-line.active label{
    width: 100%;
    margin-bottom: 3px;
}
.form-line textarea{
    width: 100%;
    height: 60px;
}

/* ============ PHÂN TRANG ============ */
.pagination{
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.pagination .page-item .page-link{
    display: block;
    padding: 6px 14px;
    background: #fff;
    color: var(--nhk-gray-text);
    text-decoration: none;
    border: 1px solid var(--nhk-border);
    font-size: 14px;
    font-weight: 600;
}
.pagination .page-item .page-link:hover{
    background: var(--nhk-red);
    color: #fff;
    border-color: var(--nhk-red);
}
.pagination .page-item.active .page-link{
    background: var(--nhk-red);
    color: #fff;
    border-color: var(--nhk-red);
}

/* ============ FOOTER (kiểu NHK: nền đen, vạch đỏ) ============ */
footer {
    background: var(--nhk-black);
    z-index: 20;
    clear:both;
    border-top: 4px solid var(--nhk-red);
}
.footer.row{
    padding: 30px 15px 10px 15px;
}
.footer-connect a {
    color:white
}
.container.footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 20px;
}
.footer-logo img{
    max-height: 46px;
    filter: none;
}
.footer-logo {
    margin-bottom: 12px;
}
.footer-map{
    border: 5px solid var(--nhk-red);
}
.txtf {
    color: #9a9a9a;
    text-align: left;
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.footer-title {
    margin: 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--nhk-red);
    padding-left: 8px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    border-radius: 50%;
}

.socail-f { background: #2f2f2f; color: #fff; }
.socail-ins { background: #2f2f2f; color: #fff; }
.socail-tw { background: #2f2f2f; color: #fff; }
.socail-yb { background: #2f2f2f; color: #fff; }
.socail-g { background: #2f2f2f; color: #fff; }
.footer-social a:hover{ background: var(--nhk-red); }

.connect-line {
    display: block;
    width: 100%;
    padding: 6px 0;
    border-bottom: 1px solid #333;
    color: #9a9a9a;
    text-decoration: none;
    font-size: 13px;
}
.connect-line:hover{
    color: var(--nhk-red);
}
.copyright{
    padding: 12px;
    margin-top: 10px;
    text-align: center;
    background: #111;
    color: #9a9a9a;
    font-size: 12px;
}
.copyright .footer-title{
    border-left: none;
    padding-left: 0;
    text-transform: none;
    font-weight: 400;
    color: #9a9a9a;
    margin: 0;
}
h1.gioithieuwebsite {
    font-size: 14px;
    font-style: normal;
    color:var(--nhk-gray-muted);
    text-align: left;
    line-height: 160%;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--nhk-border);
    border-top: none;
}
.tintrongngay .listNews .mottintrongngay {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--nhk-border);
}
.tintrongngay .listNews .mottintrongngay .news-content{
    height: 150px;overflow: hidden;
    line-height: 150%;
    text-align: left;
}

.tintrongngay .listNews .mottintrongngay img{
    width:220px;
    height: 150px;
    margin-right: 20px;
    border: none;
}

/* ============ NÚT "XEM TẤT CẢ" ============ */
.btn-viewall{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding: 10px 26px;
    background: var(--nhk-black);
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 999px;
    transition: background 0.2s;
}
.btn-viewall:hover{
    background: var(--nhk-red);
    color: #fff !important;
}

/* ============ THỂ LOẠI DROPDOWN ĐANG CHỌN ============ */
.navbar.navbar-dark .dropdown-item.active{
    background: var(--nhk-red);
    color: #fff;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 767px){
    .layout{
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 160px 160px 160px 160px 160px;
    }
    .layout-item:first-child{ grid-column: 1/3; grid-row: 1/2; }
    .layout-item:nth-child(2){ grid-column: 1/2; grid-row: 2/3; }
    .layout-item:nth-child(3){ grid-column: 2/3; grid-row: 2/3; }
    .layout-item:nth-child(4){ grid-column: 1/2; grid-row: 3/4; }
    .layout-item:nth-child(5){ grid-column: 2/3; grid-row: 3/4; }
    .layout-item:last-child{ grid-column: 1/3; grid-row: 4/5; }
    .mottin{
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hinhcuatin img, .mottin img{
        width: 100%;
        height: 180px;
    }
    .related-Posts_list{
        grid-template-columns: 1fr 1fr;
    }
}