/*
Theme Name: Họ Nhữ Việt Nam
Theme URI: https://honhuvietnam.com/
Author: Ban quản trị Họ Nhữ Việt Nam
Description: Giao diện chuyển từ NukeViet 3.3 (theme "tna") sang WordPress, giữ nguyên bố cục 3 cột, banner và tông màu đỏ của website gốc.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: honhuvietnam
*/

/* ---------- Reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html,body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,em,img,strong,ul,ol,li,form,label,table,tr,th,td,fieldset{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline}
ul,ol{list-style:none}
table{border-collapse:collapse;border-spacing:0}
img{max-width:100%}
.clearfix::after,.clear{content:"";display:block;clear:both}
.fl{float:left}.fr{float:right}
.screen-reader-text{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- Nền & khung ---------- */
body{background:#9c0305 url(images/bg.jpg) top center fixed repeat-x;font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:13px;line-height:1.5;color:#222}
a,a:visited{color:#af0909;text-decoration:none}
a:hover{color:#c34949}
#container{width:1000px;max-width:100%;margin:0 auto;background:#fff}

/* ---------- Header ---------- */
#header{background:#A2D8FA url(images/banner.jpg) no-repeat center top;height:200px;position:relative}
#header a.home-link{display:block;height:100%}
#header .sitename{position:absolute;left:-9999px}

/* ---------- Menu chính (thuần CSS, không dùng ảnh nền) ---------- */
.nav{background:#e30504;background:linear-gradient(to bottom,#e30504 0%,#e40405 12%,#e41211 23%,#e82223 35%,#ea3637 46%,#ea4444 58%,#e94544 69%,#ea3e3c 81%,#e62d2b 92%,#e71f22 100%);height:27px;line-height:27px;position:relative;z-index:990}
.nav ul{margin:0;padding:0}
.nav ul.menu{display:flex;align-items:stretch}
.nav ul.menu>li{position:relative;margin:0 2px 0 0}

/* Dải sáng vàng "tỏa sáng" khi rê chuột / mục đang mở: giữa vàng, trên dưới cam đỏ, hai đầu mờ dần */
.nav ul.menu>li::before{content:"";position:absolute;top:0;bottom:0;left:-12px;right:-12px;z-index:0;opacity:0;pointer-events:none;
  transition:opacity .25s ease;
  background:#f4e003;background:linear-gradient(to bottom,#e10e03 0%,#e82804 12%,#e96709 23%,#f5ad0d 35%,#f4e003 46%,#f6d804 58%,#f0af17 69%,#f3742d 81%,#eb4329 92%,#e32d18 100%);
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);
  mask-image:linear-gradient(to right,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%)}
.nav ul.menu>li:hover::before,.nav ul.menu>li:focus-within::before,
.nav ul.menu>li.current-menu-item::before,.nav ul.menu>li.current-menu-ancestor::before,.nav ul.menu>li.current-menu-parent::before{opacity:1}

.nav ul.menu>li>a{position:relative;z-index:1;display:block;height:27px;line-height:27px;padding:0 14px 0 12px;color:#fff;font-size:13px;font-weight:700;
  text-shadow:0 1px 2px rgba(0,0,0,.7),0 0 3px rgba(0,0,0,.35);transition:text-shadow .25s ease}
.nav ul.menu>li:hover>a,.nav ul.menu>li.current-menu-item>a,.nav ul.menu>li.current-menu-ancestor>a{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85),0 0 4px rgba(120,40,0,.6)}

/* Chấm tròn đầu mục: xanh; mục đang mở: đỏ */
.nav ul.menu>li>a::before{content:"";display:inline-block;width:7px;height:7px;margin:0 7px 1px 0;border-radius:50%;vertical-align:middle;
  background:#2eff2e;box-shadow:0 0 4px #0f0,0 0 0 1px rgba(0,80,0,.35)}
.nav ul.menu>li.current-menu-item>a::before,.nav ul.menu>li.current-menu-ancestor>a::before,.nav ul.menu>li.current-menu-parent>a::before{background:#f00;box-shadow:0 0 3px #a00,0 0 0 1px rgba(90,0,0,.4)}

/* Mục "Trang chủ": nút đỏ sẫm bóng + biểu tượng ngôi nhà */
.nav ul.menu>li:first-child{margin-right:6px}
.nav ul.menu>li:first-child::before{display:none}
.nav ul.menu>li:first-child>a{padding-left:10px;padding-right:20px;border-radius:0 14px 0 0;
  background:#902200;background:linear-gradient(to bottom,#f44d20 0%,#ff896a 12%,#ff785a 23%,#fa602e 35%,#dd4110 46%,#902200 58%,#961f01 69%,#971f00 81%,#901e03 92%,#801c00 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.nav ul.menu>li:first-child>a::before,.nav ul.menu>li:first-child.current-menu-item>a::before{width:17px;height:17px;margin:0 6px 2px 0;border-radius:0;box-shadow:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1 .6 7.6h2.1V14.6h4.3v-4.1h2v4.1h4.3V7.6h2.1z' fill='%23fff' stroke='%23000' stroke-width='.9' stroke-linejoin='round'/%3E%3Crect x='6.9' y='9.6' width='2.2' height='5' fill='%23f5b800'/%3E%3C/svg%3E") no-repeat center/contain}
.nav ul.menu>li:first-child:hover>a{filter:brightness(1.12)}

/* Menu con */
.nav ul.sub-menu{display:none;position:absolute;left:0;top:27px;width:240px;z-index:5;background:#ee1212;border:1px solid #b5b9be;border-top:0;box-shadow:0 4px 8px rgba(0,0,0,.35)}
.nav ul.sub-menu li{position:relative;border-bottom:1px solid #b5b9be}
.nav ul.sub-menu li a{display:block;padding:0 10px;line-height:25px;color:#fff;font-size:12px;font-weight:400;transition:background .2s}
.nav ul.sub-menu li a:hover{background:#da4141;color:#fff}
.nav ul.sub-menu ul.sub-menu{left:100%;top:0}
.nav li:hover>ul.sub-menu,.nav li:focus-within>ul.sub-menu{display:block}
.nav-toggle{display:none}

/* ---------- Thanh ngày giờ + tìm kiếm ---------- */
#message{height:30px;line-height:25px;background:#d7d7d7 url(images/message_bg.jpg) repeat-x;padding:0 0 0 10px;overflow:hidden}
#message .clock{display:block;float:left;background:url(images/message_time_bg_r.jpg) no-repeat top right;padding:0 13px 0 0}
#message .clock span{display:block;float:left;background:url(images/message_time_bg_l.jpg) no-repeat;padding:0 0 0 13px;font-size:11px;color:#333;font-weight:700;line-height:30px}
#message form.search{float:right;background:url(images/message_search.jpg) no-repeat;width:278px;height:30px}
#message form.search input.txt{margin:4px 0 0 40px;width:184px;height:20px;border:1px solid #bbb;font-size:11px;padding:1px 3px}
#message form.search input.submit{margin:4px 0 0 4px;width:40px;height:20px;padding:0;text-transform:uppercase;font-size:10px;cursor:pointer;border:1px solid #999;background:#eee}

/* ---------- Bố cục 3 cột ---------- */
.contentwrapper{padding:10px 0;display:flex;gap:10px;align-items:flex-start}
.col-left{width:190px;flex:0 0 190px}
.col-main{width:560px;flex:1 1 560px;min-width:0}
.col-right{width:230px;flex:0 0 230px}
.contentwrapper>*{min-width:0}

/* ---------- Breadcrumb ---------- */
h3.breakcolumn{line-height:27px;border-bottom:1px solid #ccc;font-weight:400;margin-bottom:8px;font-size:12px}
h3.breakcolumn img{vertical-align:middle}
h3.breakcolumn .sep{font-size:14px;font-weight:700;padding:0 4px}

/* ---------- Box (khối bên cạnh) ---------- */
div.box{margin-bottom:15px;width:100%}
div.box.silver{background:#f2f2f2}
div.box h3.header{height:28px;line-height:28px;color:#fff;text-indent:10px;background:#e93434 url(images/h3.header.jpg) repeat-x;border-bottom:2px solid #fff;font-size:13px}
div.box h3.header a{color:#fff}
div.box h3.header strong{padding-right:4px;color:#ff0}
.box_orange{background:#FC3;border:1px solid #EBEBEB;margin-bottom:15px}
.box_orange .header{background:#FC3;height:28px;line-height:28px;color:#000;text-indent:10px;font-size:13px}
.box_orange .header strong{padding-right:4px;color:#c00}
.box_orange ul{background:#fff8dc;padding:4px 6px}
div.content,.box .content{padding:8px}
ul.list_item{padding:0 2px 6px}
ul.list_item li{padding:6px 10px;border-bottom:1px solid #ccc;clear:both;line-height:1.35}
ul.list_item li a{color:#333}
ul.list_item li a:hover{color:#af0909}
ul.list_item li.cat-child{padding-left:22px;font-size:12px}
ul.list_item li .num{color:#999;font-size:11px}
.box form.login{padding:0 10px 10px}
.box form.login label{display:block;font-weight:700;padding:5px 0 4px}
.box form.login input[type=text],.box form.login input[type=password]{border:1px solid #b2b0b1;padding:3px;width:100%}
.box form.login input[type=submit]{margin-top:6px;padding:3px 10px;cursor:pointer}
.box .signed{padding:8px 10px}
.box .stat-list{padding:6px 10px}
.box .stat-list li{display:flex;justify-content:space-between;padding:2px 0;border-bottom:1px dotted #ccc}
.box .center{text-align:center;padding:6px}

/* ---------- Tin nổi bật (đầu trang chủ) ---------- */
#topnews{background:#ecf2f7;border:1px solid #c3d3e0;margin-bottom:10px;padding:4px}
#topnews .indent{background:#f9fbfd;display:flex;gap:10px;padding:6px}
#topnews .headline{flex:0 0 300px;max-width:300px}
#topnews .headline img{width:100%;height:auto;max-height:210px;object-fit:cover;border:1px solid #ccc;padding:2px;background:#fff}
#topnews .headline h3{font-size:15px;line-height:1.3;margin:6px 0 2px}
#topnews .headline h3 a{color:#e60e0e}
#topnews .headline p{font-size:12px;color:#555}
#topnews ul.lastest-news{flex:1;min-width:0}
#topnews ul.lastest-news a{background:url(images/squared-blue.png) no-repeat 5px 9px;border-bottom:1px dotted #bbdbf6;color:#383838;display:block;padding:3px 0 3px 16px;font-weight:400}
#topnews ul.lastest-news a:hover{background-color:#fff;color:#af0909}
#topnews .tabtitle{font-weight:700;color:#0842ae;padding:0 0 3px 4px;border-bottom:2px solid #c3d3e0;margin-bottom:2px}

/* ---------- Khối chuyên mục trên trang chủ ---------- */
.home-cats{display:flex;flex-wrap:wrap;gap:0 10px}
.home-cats .news_column{width:calc(50% - 5px)}
div.news_column{border-bottom:2px solid #e8e8e8;margin-bottom:10px}
div.news_column div.header{background:url(images/news_cat_header.png) repeat-x;border-bottom:1px solid #ccc;padding:4px 0 0 4px;min-height:31px;overflow:hidden}
div.news_column div.header a{color:#3b3b3b;display:block;float:left;font-weight:400;height:28px;line-height:20px;padding:0 0 0 10px;font-size:12px}
div.news_column div.header a.current{background:url(images/news_arrow_down.png) no-repeat center 100%;font-weight:700;padding:0}
div.news_column div.header a.current span{background:url(images/news_cat_r.png) no-repeat top right;cursor:pointer;display:block;float:left;height:23px;padding:0 6px 0 0}
div.news_column div.header a.current span span{background:url(images/news_cat_l.png) no-repeat;color:#fff;padding:0 0 0 6px;max-width:300px;overflow:hidden;white-space:nowrap}
div.news_column div.items{padding:6px 4px;border-left:1px solid #eee;border-right:1px solid #eee}
div.news_column div.items img{border:1px solid #ccc;float:left;margin:0 8px 4px 0;padding:2px;width:100px;height:auto;max-height:100px;object-fit:cover;background:#fff}
div.news_column div.items h3{font-size:13px;line-height:1.3;margin-bottom:3px}
div.news_column div.items h3 a{color:#e60e0e;font-weight:700}
div.news_column div.items h3 a:hover{color:#ef5252}
div.news_column div.items p{font-size:12px;color:#444;text-align:justify}
div.news_column ul.related{padding:4px 6px 6px;border-left:1px solid #eee;border-right:1px solid #eee}
div.news_column ul.related li{padding:1px 0}
div.news_column ul.related a{background:url(images/arrow_left_orange.png) no-repeat 0 8px;color:#3b3b3b;display:block;padding-left:9px;line-height:1.4}
div.news_column ul.related a:hover{color:#af0909}

/* ---------- Danh sách bài viết (chuyên mục, tìm kiếm) ---------- */
.archive-title{font-size:16px;color:#af0909;padding:4px 0 8px;border-bottom:2px solid #e8e8e8;margin-bottom:8px}
.archive-desc{color:#555;margin-bottom:8px}
.post-item{padding:10px 4px;border-bottom:1px dotted #ccc;overflow:hidden}
.post-item img.thumb{border:1px solid #ccc;float:left;margin:0 10px 4px 0;padding:2px;width:120px;height:auto;max-height:120px;object-fit:cover;background:#fff}
.post-item h2{font-size:14px;line-height:1.3;margin-bottom:3px}
.post-item h2 a{color:#e60e0e;font-weight:700}
.post-item h2 a:hover{color:#ef5252}
.post-item .meta{font-size:11px;color:#999;margin-bottom:3px}
.post-item p{text-align:justify;color:#333}
.pagination,.nav-links{padding:12px 0;text-align:center}
.nav-links .page-numbers{display:inline-block;padding:3px 9px;margin:0 2px;border:1px solid #ccc;background:#f7f7f7;color:#333}
.nav-links .page-numbers.current{background:#e32828;border-color:#e32828;color:#fff;font-weight:700}
.nav-links a.page-numbers:hover{background:#fee;color:#af0909}

/* ---------- Bài viết chi tiết ---------- */
#news_detail h1{color:#222;font-size:21px;line-height:1.3;padding:4px 0 6px;font-weight:700}
#news_detail .postmeta{color:#999;font-size:11px;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:10px}
#news_detail .postmeta a{color:#888}
#news_detail .bodytext{font-size:14px;line-height:1.65;overflow-wrap:break-word}
#news_detail .bodytext p{padding:4px 0}
#news_detail .bodytext img{max-width:100% !important;height:auto !important}
#news_detail .bodytext table{max-width:100%}
#news_detail .bodytext iframe,#news_detail .bodytext video{max-width:100%}
#news_detail .bodytext h2,#news_detail .bodytext h3,#news_detail .bodytext h4{margin:10px 0 4px;font-weight:700}
#news_detail .bodytext ul{list-style:disc;margin:4px 0 4px 22px}
#news_detail .bodytext ol{list-style:decimal;margin:4px 0 4px 22px}
#news_detail .bodytext blockquote{border-left:3px solid #e32828;margin:8px 0;padding:2px 12px;color:#444;background:#fafafa}
#news_detail .bodytext a{text-decoration:underline}
#news_detail .excerpt-lead{font-weight:700;margin-bottom:8px}
.hnv-source{text-align:right}
.post-author-line{text-align:right;padding:6px 0}
.copyright-note{margin:12px 0;padding:8px 10px;background:#fff8e5;border:1px solid #f0dca0;font-size:12px;color:#555}
.post-tags{margin:10px 0;font-size:12px}
.post-tags a{display:inline-block;background:#f2f2f2;border:1px solid #ddd;padding:1px 8px;margin:0 4px 4px 0;color:#555}
.related-box h4{border-bottom:2px solid #e32828;color:#af0909;font-size:14px;padding:4px 0;margin:14px 0 6px}
.related-box ul.related li{padding:2px 0}
.related-box ul.related a{background:url(images/arrow_left_orange.png) no-repeat 0 8px;padding-left:10px;display:block}
.related-box .date{color:#999;font-size:11px}
.page-content{font-size:14px;line-height:1.65}
.page-content p{padding:4px 0}
.page-content img{max-width:100%;height:auto}
.page-content table{max-width:100%}
h1.page-title{color:#af0909;font-size:20px;padding:4px 0 8px;border-bottom:2px solid #e8e8e8;margin-bottom:10px}

/* ---------- Album ---------- */
.hnv-album img{border:1px solid #ccc;padding:3px;margin:0 8px 8px 0;max-width:180px;height:auto;background:#fff}
.hnv-album h3{margin:12px 0 6px;color:#af0909}

/* ---------- Bình luận ---------- */
#comments{margin-top:18px}
#comments h3.comments-title{background:#f2f2f2;border-left:4px solid #e32828;padding:5px 10px;font-size:14px;margin-bottom:8px}
ol.comment-list{margin:0;padding:0}
ol.comment-list li.comment{padding:8px 4px;border-bottom:1px dotted #ccc}
ol.comment-list .comment-meta{font-size:11px;color:#888;margin-bottom:3px}
ol.comment-list .comment-author .fn{font-weight:700;color:#333;font-style:normal}
ol.comment-list ol.children{margin-left:24px}
#respond{margin-top:14px}
#respond h3{font-size:14px;margin-bottom:6px;color:#af0909}
#respond label{display:block;font-weight:700;margin:6px 0 2px}
#respond input[type=text],#respond input[type=email],#respond input[type=url],#respond textarea{width:100%;border:1px solid #bbb;padding:4px}
#respond input[type=submit],.hnv-contact input[type=submit]{margin-top:8px;padding:5px 16px;background:#e32828;color:#fff;border:1px solid #b00;cursor:pointer;font-weight:700}
.comment-notes,.logged-in-as{font-size:11px;color:#888}
.comment-form-cookies-consent{font-size:11px}
.comment-form-cookies-consent label{display:inline;font-weight:400}

/* ---------- Form liên hệ ---------- */
.hnv-contact{max-width:520px;margin-top:10px}
.hnv-contact label{display:block;font-weight:700;margin:8px 0 2px}
.hnv-contact input[type=text],.hnv-contact input[type=email],.hnv-contact textarea{width:100%;border:1px solid #bbb;padding:5px}
.hnv-contact .hp{position:absolute;left:-9999px}
.hnv-msg{padding:8px 12px;margin:8px 0;border:1px solid}
.hnv-msg.ok{background:#e9ffd4;border-color:#8c8}
.hnv-msg.err{background:#ffe9e9;border-color:#c88}

/* ---------- Footer ---------- */
.site-info{padding:10px 10px 6px;text-align:center;line-height:1.6}
#footer{border-top:8px solid #cc0303;background:#f7f7f7 url(images/footer_bg.jpg) repeat-x;padding:6px 10px;text-align:center;font-size:11px;color:#9c9c9c}
#footer a{color:#9c9c9c}

/* ---------- Tìm kiếm / 404 ---------- */
.not-found{padding:20px 0}
.not-found h1{font-size:20px;color:#af0909;margin-bottom:8px}
.not-found form{margin-top:10px}
.not-found input[type=search]{padding:4px;width:240px}

/* ---------- Màn hình nhỏ ---------- */
@media (max-width:1020px){
  #header{height:auto;aspect-ratio:5/1;background-size:cover}
  .contentwrapper{flex-direction:column;padding:10px}
  .col-left,.col-main,.col-right{width:100%;flex:1 1 auto}
  .col-left{order:2}.col-right{order:3}.col-main{order:1}
  .nav{height:auto}
  .nav-toggle{display:block;width:100%;text-align:left;background:#cc0303;color:#fff;border:0;padding:6px 12px;font-weight:700;cursor:pointer}
  .nav ul.menu{display:none}
  .nav.open ul.menu{display:flex}
  .nav ul.menu{flex-direction:column}
  .nav ul.menu>li{margin:0;border-top:1px solid rgba(255,255,255,.25)}
  .nav ul.menu>li>a{height:auto;line-height:30px}
  .nav ul.menu>li::before{left:0;right:0}
  .nav ul.sub-menu{display:block;position:static;width:100%;border:0;background:#c70f0f}
  .nav ul.sub-menu li a{padding-left:26px}
  #message{height:auto;padding:4px 6px;display:flex;flex-wrap:wrap;gap:4px;justify-content:space-between}
  #message .clock,#message form.search{float:none}
  .home-cats .news_column{width:100%}
  #topnews .indent{flex-direction:column}
  #topnews .headline{flex:1 1 auto;max-width:100%}
  #news_detail h1{font-size:18px}
}
@media (max-width:520px){
  #message form.search{width:100%;background:none}
  #message form.search input.txt{margin-left:0;width:calc(100% - 52px)}
  .post-item img.thumb{width:90px}
}
/* ---------- Danh sách bài viết ở cột bên: có ảnh thumb ---------- */
ul.thumb-list li.has-img{display:flex;align-items:flex-start;gap:8px}
ul.thumb-list .tl-img{flex:0 0 56px;width:56px}
ul.thumb-list .tl-img img{display:block;width:56px;height:42px;object-fit:cover;border:1px solid #ccc;padding:1px;background:#fff}
ul.thumb-list .tl-title{flex:1;min-width:0;font-size:12px;line-height:1.35}
/* ---------- Nút chia sẻ mạng xã hội ---------- */
.share-box{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 6px;padding-top:10px;border-top:1px dotted #ccc}
.share-label{font-weight:700;color:#555;margin-right:2px}
.share-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:#777;color:#fff;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
.share-btn svg{width:17px;height:17px;fill:#fff}
.share-btn:hover{transform:translateY(-2px);box-shadow:0 3px 8px rgba(0,0,0,.3);filter:brightness(1.08);color:#fff}
.share-btn:focus-visible{outline:2px solid #e32828;outline-offset:2px}
.share-fb{background:#1877f2}.share-x{background:#000}.share-in{background:#0a66c2}
.share-tg{background:#26a5e4}.share-em{background:#6b7280}.share-copy{background:#e32828}
.share-note{font-size:12px;color:#2a7a2a;font-weight:700}