/**
 * Custom CSS - Bo cuc tap chi (Magazine Layout)
 */

/* ============================================
   1. LAYOUT
   ============================================ */
.wraper {
    width: 1280px;
}

/* ============================================
   2. HEADER - Top bar + Logo giua + Search
   ============================================ */

/* Top bar: hotline, social icons */
.header-topbar {
    background: #8b0000;
    color: #fff;
    font-size: 13px;
    padding: 3px 15px;
    line-height: 1.4;
}
.header-topbar .wraper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-topbar .topbar-left {
    padding-left: 5px;
}
.header-topbar .topbar-right {
    padding-right: 30px;
}
.header-topbar a {
    color: #ffd700;
    margin-left: 8px;
}
.header-topbar a:hover {
    color: #fff;
}
.header-topbar .topbar-left .fa {
    margin-right: 4px;
}
.header-topbar .topbar-right a {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    margin-left: 4px;
    color: #fff;
    font-size: 13px;
}
.header-topbar .topbar-right a:hover {
    background: rgba(255,255,255,0.35);
}

/* Header main - compact, max-width centered */
.header-topbar,
.section-header {
    max-width: 1280px;
    margin: 0 auto;
}
.section-header {
    background: #fff;
    padding: 0;
    border-bottom: 3px solid #b71c1c;
}

#header {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: none !important;
    padding: 5px 0;
    text-align: center;
}

#header .logo {
    padding: 0;
    text-align: center;
}

#header .logo img {
    max-height: 65px;
    width: auto;
}

#header .logo h1,
#header .logo .site_name,
#header .logo h2,
#header .logo .site_description {
    display: none !important;
}

#header .right-ads {
    display: none;
}

/* Search bar - right side of header */
.header-search-bar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.section-header .wraper {
    position: relative;
}
.header-search-bar .input-group {
    width: 240px;
}
.header-search-bar .form-control {
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    height: 30px;
    font-size: 12px;
    background: #fff;
    box-shadow: none;
}
.header-search-bar .btn {
    border-radius: 0 3px 3px 0;
    background: #b71c1c;
    border-color: #b71c1c;
    color: #fff;
    height: 30px;
    padding: 4px 10px;
}
.header-search-bar .btn:hover {
    background: #8b0000;
}

/* Hide old third-nav - completely remove space */
.third-nav {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Make header areas flush - no gray gaps */
.section-body {
    background: #fff;
    padding-top: 0;
}

#body {
    padding-top: 0;
}

/* ============================================
   3. NAVIGATION - Menu do
   ============================================ */

#menusite {
    max-width: 1280px;
    margin: 0 auto;
}
#menusite .navbar-default {
    background-color: #b71c1c !important;
    border-bottom-color: #8b0000 !important;
    border-radius: 0;
}

#menusite .navbar-default .navbar-nav > li > a {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 12px;
    letter-spacing: 0.3px;
}

#menusite .navbar-default .navbar-nav > li > a:hover,
#menusite .navbar-default .navbar-nav > li > a:focus,
#menusite .navbar-default .navbar-nav > .active > a,
#menusite .navbar-default .navbar-nav > .active > a:hover,
#menusite .navbar-default .navbar-nav > .active > a:focus,
#menusite .navbar-default .navbar-nav > .open > a,
#menusite .navbar-default .navbar-nav > .open > a:hover,
#menusite .navbar-default .navbar-nav > .open > a:focus {
    background: rgba(0,0,0,0.25) !important;
    color: #ffd700 !important;
}

#menusite .navbar-default .navbar-nav > li + li {
    border-left: 1px solid rgba(255,255,255,0.15);
}

/* Dropdown */
#menusite .dropdown-menu {
    background-color: #c62828 !important;
    border-color: #8b0000 !important;
}
#menusite .dropdown-menu > li > a {
    color: #fff !important;
}
#menusite .dropdown-menu > li > a:hover {
    background: rgba(0,0,0,0.2) !important;
    color: #ffd700 !important;
}
#menusite .dropdown-menu > li {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* Mobile menu colors */
.wsmobileheader {
    background: #b71c1c !important;
}

/* ============================================
   4. BODY - Content area
   ============================================ */

#body {
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: #fff;
    padding: 10px 5px 0;
    width: 100% !important;
}

.section-body {
    background: #f5f5f5;
    padding-top: 0;
}

/* Remove container fixed width inside body */
#body.container {
    width: 100% !important;
    padding: 10px 5px 0;
}

/* ============================================
   5. HOMEPAGE LAYOUT
   ============================================ */

/* Block wrapper styling - Magazine style */
.tmsheading {
    background-color: #b71c1c !important;
    background-image: none !important;
    padding: 10px 15px !important;
    font-size: 15px;
    letter-spacing: 0.5px;
    border-left: 4px solid #ffd700;
    text-transform: uppercase;
}

.tmsheadingprimary {
    background-color: #8b0000 !important;
    background-image: none !important;
    padding: 10px 15px !important;
    font-size: 15px;
    letter-spacing: 0.5px;
    border-left: 4px solid #ffd700;
    text-transform: uppercase;
}

.tmspanel,
.tmspanelprimary {
    border: 1px solid #e0e0e0;
    border-radius: 0;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tmsbody {
    padding: 8px;
}

/* ============================================
   6. FOOTER - Dark background magazine style
   ============================================ */

.footerNav2 {
    background-color: #b71c1c !important;
}
.footerNav2 .theme-change a,
.footerNav2 .theme-change span {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}
.footerNav2 .bttop a {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}

#footer {
    background: #1a1a2e !important;
    padding: 30px 0 15px;
    font-size: 13px;
    line-height: 1.8;
}

#footer,
#footer a {
    color: #ccc;
}

#footer a:hover {
    color: #ffd700;
}

#footer .bl-title {
    color: #ffd700;
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffd700;
    display: inline-block;
}

/* ============================================
   7. BREADCRUMBS - Match red theme
   ============================================ */

.breadcrumbs a,
.show-subs-breadcrumbs {
    background-color: #b71c1c;
}

.breadcrumbs a:before {
    border-color: #b71c1c #b71c1c #b71c1c transparent;
}

.breadcrumbs a:hover,
.show-subs-breadcrumbs:hover {
    background-color: #ffd700;
    color: #333;
}

.breadcrumbs a:hover:before {
    border-color: #ffd700 #ffd700 #ffd700 transparent;
}

/* ============================================
   8. NEWS BLOCKS - Magazine style
   ============================================ */

/* News category headings */
.panelnewsheading {
    background-color: #b71c1c !important;
    border-color: #b71c1c !important;
    border-left: 4px solid #ffd700;
}
.panelnewsheading h2 {
    background: #b71c1c !important;
    font-size: 15px;
}
.panelnewsheading h2:after {
    background: #b71c1c !important;
}
.panelnewsheading h2 a {
    color: #ffd700 !important;
}

.panelnewsheading a {
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
}

/* Magazine block - 2 columns inside [TOP] */
.magazine-block {
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
}

/* Left: TIN NOI BAT list */
.mag-left {
    border-right: 1px solid #eee;
    height: 100%;
}
.mag-heading {
    background: #b71c1c;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    padding: 8px 12px;
    border-left: 3px solid #ffd700;
}
.mag-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mag-list li {
    padding: 8px;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
}
.mag-list li:last-child {
    border-bottom: none;
}
.mag-list li img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    margin-right: 8px;
}
.mag-list li a.show {
    color: #333;
    font-weight: 500;
}
.mag-list li a.show:hover {
    color: #b71c1c;
}

/* Center/Right: Featured + sub articles */
.mag-center {
    padding: 8px;
}
.tms_noibat h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 8px 0 5px;
}
.tms_noibat h3 a {
    color: #b71c1c !important;
}
.tms_noibat h3 a:hover {
    color: #8b0000 !important;
}

/* Sub articles row */
.mag-sub {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}
.mag-sub-item {
    margin-bottom: 8px;
}
.mag-sub-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 5px;
}
.mag-sub-item h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}
.mag-sub-item h4 a {
    color: #333;
}
.mag-sub-item h4 a:hover {
    color: #b71c1c;
}

/* SIDEBAR BANNERS - above Tieu Diem */
.sidebar-banners {
    margin-bottom: 10px;
}
.sidebar-banners a {
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    transition: box-shadow 0.2s;
}
.sidebar-banners a:last-child {
    margin-bottom: 0;
}
.sidebar-banners a:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0.9;
}
.sidebar-banners img {
    width: 100%;
    height: auto;
    display: block;
}

/* TIEU DIEM sidebar block */
.block-tieudiem .td-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
}
.block-tieudiem .td-item:first-child .td-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 6px;
    display: block;
}
.block-tieudiem .td-item:not(:first-child) .td-img {
    display: none;
}
.block-tieudiem .td-item:not(:first-child) {
    padding-left: 12px;
    position: relative;
}
.block-tieudiem .td-item:not(:first-child):before {
    content: "\f0da";
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #b71c1c;
}
.block-tieudiem .td-item:last-child {
    border-bottom: none;
}
.block-tieudiem h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 3px;
}
.block-tieudiem h4 a {
    color: #333;
}
.block-tieudiem h4 a:hover {
    color: #b71c1c;
}
.block-tieudiem .td-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.block-tieudiem .td-item:not(:first-child) .td-excerpt {
    display: none;
}

/* ============================================
   CATEGORY BLOCKS - 2 per row, magazine style
   ============================================ */
.mag-categories-row {
    margin-left: -5px;
    margin-right: -5px;
}
.mag-categories-row > div {
    padding: 0 5px;
}
.mag-category {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

/* Category heading */
.mag-cat-heading {
    background: #b71c1c;
    padding: 8px 12px;
    border-left: 3px solid #ffd700;
}
.mag-cat-heading a {
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
}
.mag-cat-heading a:hover {
    color: #ffd700 !important;
}

.mag-cat-body {
    padding: 10px;
}

/* Top featured: image left + info right */
.mag-cat-top {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.mag-cat-topimg {
    width: 160px;
    height: 110px;
    object-fit: cover;
    margin-right: 10px;
    margin-bottom: 5px;
}
.mag-cat-topinfo h3 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 5px;
}
.mag-cat-topinfo h3 a {
    color: #333;
}
.mag-cat-topinfo h3 a:hover {
    color: #b71c1c;
}
.mag-cat-meta {
    font-size: 12px;
    color: #999;
}
.mag-cat-meta .fa {
    margin-right: 3px;
}

/* Bullet list */
.mag-cat-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mag-cat-bullets li {
    padding: 4px 0 4px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px dashed #eee;
    position: relative;
}
.mag-cat-bullets li:last-child {
    border-bottom: none;
}
.mag-cat-bullets li:before {
    content: "\f0da";
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #b71c1c;
}
.mag-cat-bullets li a {
    color: #333;
}
.mag-cat-bullets li a:hover {
    color: #b71c1c;
}

/* Article list items */
.tms_list_tin li {
    padding: 6px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.tms_list_tin li:last-child {
    border-bottom: none;
}

.tms_list_tin li a {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.tms_list_tin li a:hover {
    color: #b71c1c;
}

/* Featured article image */
.tms_noibat img {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
}

/* ============================================
   9. SIDEBAR - Right column styling
   ============================================ */

/* Sidebar block titles */
.col-md-6 .tmsheading,
.col-md-8 .tmsheading {
    font-size: 14px;
    padding: 8px 12px !important;
}

/* Sidebar article list */
.col-md-6 .tmsbody li,
.col-md-8 .tmsbody li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
}

/* ============================================
   10. GENERAL TYPOGRAPHY
   ============================================ */

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #f0f0f0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', Arial, sans-serif;
}

a {
    color: #333;
}

a:hover {
    color: #b71c1c;
    text-decoration: none;
}

/* Section headers with red line */
.section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b71c1c;
    border-bottom: 3px solid #b71c1c;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* ============================================
   11. RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
    .wraper,
    .header-topbar,
    .section-header,
    #menusite {
        width: 100%;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 992px) {
    #header .logo img {
        max-height: 60px;
    }
    #header .logo h1,
    #header .logo .site_name {
        font-size: 20px;
    }
    .header-topbar {
        display: none;
    }
}

@media (max-width: 768px) {
    #header {
        padding: 10px 0;
    }
    .header-search-bar {
        display: none;
    }
    body {
        padding-top: 52px;
    }
}
