/*
Theme Name: TienMaHoa News
Theme URI: https://tienmahoa.net/
Author: TienMaHoa Team
Author URI: https://tienmahoa.net/
Description: Theme tin tức tiền mã hóa chuyên nghiệp cho TienMaHoa.Net, lấy cảm hứng từ bố cục của The Block và CoinDesk. Có banner tin nóng dạng chạy, sidebar tin đọc nhiều, lưới tin tức 5x5, hỗ trợ đầy đủ menu chuyên mục Bitcoin/Altcoin/DeFi/NFT/GameFi/Metaverse, Phân tích, Kiến thức, Pháp Lý, Bảng giá. Responsive đầy đủ theo 7 mốc thiết bị: Laptop lớn, Laptop, Laptop nhỏ/Tablet ngang, Tablet dọc, Mobile lớn, Mobile trung/nhỏ, Mobile rất nhỏ.
Version: 1.3.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tienmahoa
Tags: news, blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, sticky-post, theme-options, translation-ready
*/

/* =========================================================
   0. CSS VARIABLES
========================================================= */
:root{
  --tmh-primary: #0b6efd;      /* Xanh dương thương hiệu */
  --tmh-primary-dark:#0952c6;
  --tmh-accent: #ff5c35;       /* Cam đỏ - nhấn CTA/breaking */
  --tmh-dark: #0e1420;         /* Nền header/footer tối */
  --tmh-dark-2:#161d2b;
  --tmh-text: #1a1f29;
  --tmh-text-light:#5b6474;
  --tmh-border:#e6e9ef;
  --tmh-bg:#f5f7fa;
  --tmh-white:#ffffff;
  --tmh-green:#16a34a;
  --tmh-red:#e11d48;
  --tmh-radius: 8px;
  --tmh-shadow: 0 2px 10px rgba(15,23,42,.06);
  --tmh-shadow-lg: 0 8px 30px rgba(15,23,42,.12);
  --tmh-maxw: 1280px;
  --tmh-font: 'Inter','Be Vietnam Pro',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --tmh-font-serif:'Merriweather',Georgia,serif;
}

/* =========================================================
   1. RESET & BASE
========================================================= */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--tmh-font);
  color:var(--tmh-text);
  background:var(--tmh-bg);
  font-size:16px;
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--tmh-primary);text-decoration:none;transition:color .15s ease;}
a:hover{color:var(--tmh-accent);}
ul,ol{margin:0;padding:0;list-style:none;}
h1,h2,h3,h4,h5,h6{margin:0 0 .5em;font-weight:700;line-height:1.3;}
p{margin:0 0 1em;}
button{font-family:inherit;cursor:pointer;}
.screen-reader-text{
  border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;
  overflow:hidden;position:absolute!important;word-wrap:normal!important;
}
.container{max-width:var(--tmh-maxw);margin:0 auto;padding:0 20px;}
.site-main-layout{
  max-width:var(--tmh-maxw);
  margin:0 auto;
  padding:28px 20px 60px;
  display:grid;
  grid-template-columns:1fr;
  gap:32px;
}
@media (min-width:992px){
  .site-main-layout.has-sidebar{grid-template-columns:1fr 320px;}
}

/* =========================================================
   2. TOP BAR
========================================================= */
.tmh-topbar{
  background:var(--tmh-dark);
  color:#c6cddb;
  font-size:13px;
}
.tmh-topbar .container{
  display:flex;align-items:center;justify-content:space-between;
  height:38px;
}
.tmh-topbar .tmh-date{opacity:.85;}
.tmh-topbar-right{display:flex;align-items:center;gap:16px;}
.tmh-topbar-social a{
  color:#c6cddb;margin-left:10px;font-size:14px;
}
.tmh-topbar-social a:hover{color:var(--tmh-accent);}
.tmh-ticker-prices{display:flex;gap:18px;overflow:hidden;white-space:nowrap;}
.tmh-ticker-prices span{opacity:.9;}
.tmh-ticker-prices b{color:#fff;}
.tmh-price-up{color:#22c55e;}
.tmh-price-down{color:#f87171;}

/* =========================================================
   3. HEADER / NAV
========================================================= */
.tmh-header{
  background:var(--tmh-white);
  border-bottom:1px solid var(--tmh-border);
  position:sticky;top:0;z-index:500;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.tmh-header-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 0;gap:20px;
}
.tmh-logo img{max-height:46px;width:auto;}
.tmh-logo a{
  font-size:26px;font-weight:800;color:var(--tmh-dark);letter-spacing:-0.5px;
}
.tmh-logo a span{color:var(--tmh-primary);}

.tmh-header-search{flex:1;max-width:340px;position:relative;display:none;}
@media(min-width:1200px){.tmh-header-search{display:block;}}
.tmh-header-search input{
  width:100%;border:1px solid var(--tmh-border);border-radius:20px;
  padding:9px 40px 9px 16px;font-size:14px;background:var(--tmh-bg);
}
.tmh-header-search button{
  position:absolute;right:4px;top:50%;transform:translateY(-50%);
  background:var(--tmh-primary);color:#fff;border:none;border-radius:50%;
  width:32px;height:32px;display:flex;align-items:center;justify-content:center;
}

.tmh-header-actions{display:flex;align-items:center;gap:14px;}
.tmh-btn-search-mobile,.tmh-btn-menu-mobile{
  display:flex;align-items:center;justify-content:center;
  width:38px;height:38px;border:1px solid var(--tmh-border);border-radius:8px;background:#fff;
}
@media(min-width:1200px){.tmh-btn-search-mobile{display:none;}}
.tmh-btn-menu-mobile{display:flex;}
@media(min-width:992px){.tmh-btn-menu-mobile{display:none;}}

.tmh-cta-price{
  background:var(--tmh-accent);color:#fff;padding:9px 16px;border-radius:20px;
  font-size:13px;font-weight:700;display:none;white-space:nowrap;
}
@media(min-width:768px){.tmh-cta-price{display:inline-block;}}

/* Ô tìm kiếm trượt xuống cho Tablet/Mobile (< 1200px), thay thế window.prompt() */
.tmh-mobile-search-row{
  display:none;max-height:0;overflow:hidden;
  transition:max-height .25s ease, padding .25s ease;
  border-top:1px solid var(--tmh-border);
}
.tmh-mobile-search-row.is-open{max-height:76px;padding:12px 0;}
@media(min-width:1200px){.tmh-mobile-search-row{display:none!important;}}
@media(max-width:1199px){.tmh-mobile-search-row{display:block;}}
.tmh-mobile-search-form{
  display:flex;gap:8px;max-width:var(--tmh-maxw);margin:0 auto;padding:0 20px;
}
.tmh-mobile-search-form input{
  flex:1;border:1px solid var(--tmh-border);border-radius:20px;
  padding:10px 16px;font-size:14px;background:var(--tmh-bg);min-width:0;
}
.tmh-mobile-search-form button{
  background:var(--tmh-primary);color:#fff;border:none;border-radius:50%;
  width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;
}

/* Primary nav */
.tmh-nav-wrap{
  background:var(--tmh-dark);
}
.tmh-primary-nav{
  display:none;
}
@media(min-width:992px){
  .tmh-primary-nav{
    display:flex;align-items:center;gap:2px;
  }
}
.tmh-primary-nav > ul{display:flex;align-items:stretch;}
.tmh-primary-nav > ul > li{position:relative;}
.tmh-primary-nav > ul > li > a{
  display:flex;align-items:center;height:48px;padding:0 16px;
  color:#e7eaf1;font-weight:600;font-size:14.5px;white-space:nowrap;
}
.tmh-primary-nav > ul > li > a:hover,
.tmh-primary-nav > ul > li.current-menu-ancestor > a,
.tmh-primary-nav > ul > li.current-menu-item > a{
  background:var(--tmh-primary);color:#fff;
}
.tmh-primary-nav ul ul{
  position:absolute;top:100%;left:0;min-width:230px;
  background:var(--tmh-white);box-shadow:var(--tmh-shadow-lg);
  border-radius:0 0 8px 8px;padding:6px 0;
  opacity:0;visibility:hidden;transform:translateY(6px);
  transition:.15s ease;z-index:100;
}
.tmh-primary-nav ul li:hover > ul{opacity:1;visibility:visible;transform:translateY(0);}
.tmh-primary-nav ul ul li a{
  color:var(--tmh-text);height:auto;padding:9px 18px;font-weight:500;font-size:14px;
}
.tmh-primary-nav ul ul li a:hover{background:var(--tmh-bg);color:var(--tmh-primary);}
.tmh-primary-nav .menu-item-has-children > a::after{content:"\25BE";margin-left:6px;font-size:11px;}

/* Mobile nav drawer */
.tmh-mobile-nav{
  position:fixed;top:0;right:-320px;width:300px;height:100%;
  background:var(--tmh-white);z-index:1000;box-shadow:var(--tmh-shadow-lg);
  transition:right .25s ease;overflow-y:auto;
}
.tmh-mobile-nav.is-open{right:0;}
.tmh-mobile-nav-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px;border-bottom:1px solid var(--tmh-border);
}
.tmh-mobile-nav ul li a{
  display:block;padding:12px 20px;border-bottom:1px solid var(--tmh-border);
  font-weight:600;color:var(--tmh-text);
}
.tmh-mobile-nav ul ul li a{padding-left:36px;font-weight:500;color:var(--tmh-text-light);}
.tmh-mobile-overlay{
  position:fixed;inset:0;background:rgba(10,14,22,.5);z-index:999;
  display:none;
}
.tmh-mobile-overlay.is-open{display:block;}

/* =========================================================
   4. BREAKING NEWS TICKER (Yêu cầu #2)
========================================================= */
.tmh-ticker{
  background:var(--tmh-white);border-bottom:1px solid var(--tmh-border);
  display:flex;align-items:stretch;
}
.tmh-ticker-label{
  background:var(--tmh-accent);color:#fff;font-weight:800;font-size:13px;
  display:flex;align-items:center;gap:6px;padding:0 16px;white-space:nowrap;
  text-transform:uppercase;letter-spacing:.5px;
}
.tmh-ticker-label i{display:inline-block;width:7px;height:7px;background:#fff;border-radius:50%;
  animation:tmh-pulse 1.2s infinite;}
@keyframes tmh-pulse{0%,100%{opacity:1;}50%{opacity:.25;}}
.tmh-ticker-viewport{flex:1;overflow:hidden;position:relative;height:42px;}
.tmh-ticker-track{
  position:absolute;display:flex;align-items:center;height:100%;
  white-space:nowrap;will-change:transform;
  animation:tmh-marquee 38s linear infinite;
}
.tmh-ticker-viewport:hover .tmh-ticker-track{animation-play-state:paused;}
@keyframes tmh-marquee{
  0%{transform:translateX(0);}
  100%{transform:translateX(-50%);}
}
.tmh-ticker-track a{
  color:var(--tmh-text);font-size:14px;font-weight:500;margin-right:48px;
  display:inline-flex;align-items:center;gap:8px;
}
.tmh-ticker-track a::before{content:"\2022";color:var(--tmh-primary);font-weight:900;}
.tmh-ticker-track a:hover{color:var(--tmh-primary);}

/* =========================================================
   5. HERO / FEATURED SECTION (banner + tin đọc nhiều bên phải)
========================================================= */
.tmh-hero{
  max-width:var(--tmh-maxw);margin:24px auto 0;padding:0 20px;
  display:grid;grid-template-columns:1fr;gap:24px;
}
@media(min-width:992px){
  .tmh-hero{grid-template-columns:2fr 1fr;}
}
.tmh-hero-main{display:grid;gap:16px;}
.tmh-hero-primary{
  position:relative;border-radius:var(--tmh-radius);overflow:hidden;
  box-shadow:var(--tmh-shadow);background:#000;min-height:340px;
}
.tmh-hero-primary img{
  width:100%;height:100%;min-height:340px;object-fit:cover;opacity:.88;
}
.tmh-hero-primary-content{
  position:absolute;left:0;right:0;bottom:0;padding:24px;
  background:linear-gradient(to top,rgba(0,0,0,.88),rgba(0,0,0,0));
  color:#fff;
}
.tmh-hero-primary-content .tmh-cat{
  background:var(--tmh-primary);color:#fff;font-size:12px;font-weight:700;
  padding:4px 10px;border-radius:4px;text-transform:uppercase;letter-spacing:.5px;
}
.tmh-hero-primary-content h2{
  font-size:26px;margin:10px 0 6px;
}
.tmh-hero-primary-content h2 a{color:#fff;}
.tmh-hero-meta{font-size:13px;color:#d8dbe3;}

/* Slider ảnh chạy tự động trong khu vực Hero */
.tmh-hero-slider{position:relative;}
.tmh-hero-slide{
  position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .6s ease;z-index:0;
}
.tmh-hero-slide.is-active{opacity:1;visibility:visible;z-index:1;}
.tmh-hero-slider-dots{
  position:absolute;right:20px;bottom:18px;z-index:2;display:flex;gap:8px;
}
.tmh-hero-slider-dot{
  width:9px;height:9px;border-radius:50%;border:1px solid rgba(255,255,255,.7);
  background:rgba(255,255,255,.3);padding:0;cursor:pointer;transition:background .2s ease;
}
.tmh-hero-slider-dot.is-active{background:#fff;}

.tmh-hero-sub{
  display:grid;grid-template-columns:1fr 1fr;gap:16px;
}
@media(max-width:560px){.tmh-hero-sub{grid-template-columns:1fr;}}
.tmh-hero-sub-item{display:flex;gap:12px;background:#fff;border-radius:var(--tmh-radius);
  padding:10px;box-shadow:var(--tmh-shadow);}
.tmh-hero-sub-item img{width:96px;height:72px;object-fit:cover;border-radius:6px;flex-shrink:0;}
.tmh-hero-sub-item .tmh-cat{color:var(--tmh-primary);font-size:11.5px;font-weight:700;text-transform:uppercase;}
.tmh-hero-sub-item h3{font-size:14.5px;margin:4px 0 0;}
.tmh-hero-sub-item h3 a{color:var(--tmh-text);}

/* Sidebar "Tin đọc nhiều" (Yêu cầu #3) */
.tmh-sidebar-widget{
  background:#fff;border-radius:var(--tmh-radius);box-shadow:var(--tmh-shadow);
  padding:18px;margin-bottom:24px;
}
.tmh-widget-title{
  font-size:16px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;
  padding-bottom:12px;margin-bottom:14px;border-bottom:3px solid var(--tmh-primary);
  display:flex;align-items:center;gap:8px;
}
.tmh-widget-title i{color:var(--tmh-accent);}
.tmh-popular-list li{
  display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--tmh-border);
}
.tmh-popular-list li:last-child{border-bottom:none;padding-bottom:0;}
.tmh-popular-rank{
  font-size:22px;font-weight:800;color:var(--tmh-border);width:28px;flex-shrink:0;
  font-family:var(--tmh-font-serif);
}
.tmh-popular-list li:nth-child(1) .tmh-popular-rank{color:var(--tmh-accent);}
.tmh-popular-list li:nth-child(2) .tmh-popular-rank{color:var(--tmh-primary);}
.tmh-popular-list li:nth-child(3) .tmh-popular-rank{color:#f59e0b;}
.tmh-popular-list h4{font-size:14px;margin:0 0 4px;line-height:1.4;}
.tmh-popular-list h4 a{color:var(--tmh-text);}
.tmh-popular-list .tmh-meta-small{font-size:12px;color:var(--tmh-text-light);}

.tmh-tabs{display:flex;border-bottom:2px solid var(--tmh-border);margin-bottom:14px;}
.tmh-tabs button{
  flex:1;background:none;border:none;padding:10px 6px;font-weight:700;font-size:13px;
  color:var(--tmh-text-light);border-bottom:2px solid transparent;margin-bottom:-2px;
}
.tmh-tabs button.is-active{color:var(--tmh-primary);border-color:var(--tmh-primary);}
.tmh-tab-panel{display:none;}
.tmh-tab-panel.is-active{display:block;}

/* Widget: Giá coin */
.tmh-coin-list li{
  display:flex;align-items:center;justify-content:space-between;
  padding:9px 0;border-bottom:1px solid var(--tmh-border);font-size:13.5px;
}
.tmh-coin-list li:last-child{border-bottom:none;}
.tmh-coin-name{font-weight:700;display:flex;align-items:center;gap:8px;}
.tmh-coin-name img{width:20px;height:20px;border-radius:50%;}
.tmh-coin-change.up{color:var(--tmh-green);font-weight:700;}
.tmh-coin-change.down{color:var(--tmh-red);font-weight:700;}

.tmh-newsletter-box{
  background:linear-gradient(135deg,var(--tmh-primary),var(--tmh-primary-dark));
  color:#fff;border-radius:var(--tmh-radius);padding:20px;text-align:center;
}
.tmh-newsletter-box h3{font-size:16px;}
.tmh-newsletter-box p{font-size:13px;opacity:.9;}
.tmh-newsletter-box input[type=email]{
  width:100%;padding:10px 12px;border-radius:6px;border:none;margin-bottom:10px;font-size:13px;
}
.tmh-newsletter-box button{
  width:100%;background:var(--tmh-accent);color:#fff;border:none;padding:10px;
  border-radius:6px;font-weight:700;
}

/* =========================================================
   6. SECTION HEADINGS chung
========================================================= */
.tmh-section{margin-top:36px;}
.tmh-section-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:18px;padding-bottom:12px;border-bottom:2px solid var(--tmh-border);
}
.tmh-section-head h2{
  font-size:20px;text-transform:uppercase;letter-spacing:.3px;position:relative;
  padding-left:14px;
}
.tmh-section-head h2::before{
  content:"";position:absolute;left:0;top:2px;bottom:2px;width:5px;background:var(--tmh-accent);border-radius:2px;
}
.tmh-section-head a.tmh-view-all{font-size:13.5px;font-weight:700;color:var(--tmh-primary);}

/* =========================================================
   7. GRID TIN TỨC 5x5 (Yêu cầu #4)
========================================================= */
.tmh-news-grid{
  display:grid;grid-template-columns:repeat(5,1fr);gap:20px;
}
@media(max-width:1199px){.tmh-news-grid{grid-template-columns:repeat(4,1fr);}}
@media(max-width:991px){.tmh-news-grid{grid-template-columns:repeat(3,1fr);}}
@media(max-width:767px){.tmh-news-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:480px){.tmh-news-grid{grid-template-columns:1fr;}}

.tmh-card{
  background:#fff;border-radius:var(--tmh-radius);overflow:hidden;
  box-shadow:var(--tmh-shadow);display:flex;flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
}
.tmh-card:hover{transform:translateY(-4px);box-shadow:var(--tmh-shadow-lg);}
.tmh-card-thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:#e9edf3;}
.tmh-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease;}
.tmh-card:hover .tmh-card-thumb img{transform:scale(1.06);}
.tmh-card-cat{
  position:absolute;top:10px;left:10px;background:var(--tmh-primary);color:#fff;
  font-size:11px;font-weight:700;padding:3px 9px;border-radius:4px;text-transform:uppercase;
}
.tmh-card-body{padding:14px;display:flex;flex-direction:column;gap:8px;flex:1;}
.tmh-card-body h3{font-size:15px;line-height:1.4;}
.tmh-card-body h3 a{color:var(--tmh-text);}
.tmh-card-body h3 a:hover{color:var(--tmh-primary);}
.tmh-card-meta{
  font-size:12px;color:var(--tmh-text-light);margin-top:auto;display:flex;
  align-items:center;gap:10px;
}
.tmh-card-meta span{display:flex;align-items:center;gap:4px;}

/* Pagination */
.tmh-pagination{
  display:flex;justify-content:center;gap:6px;margin-top:32px;flex-wrap:wrap;
}
.tmh-pagination a,.tmh-pagination span{
  min-width:38px;height:38px;display:flex;align-items:center;justify-content:center;
  border-radius:6px;background:#fff;border:1px solid var(--tmh-border);
  font-weight:600;font-size:13.5px;color:var(--tmh-text);
}
.tmh-pagination .current{background:var(--tmh-primary);color:#fff;border-color:var(--tmh-primary);}
.tmh-pagination a:hover{background:var(--tmh-primary);color:#fff;border-color:var(--tmh-primary);}

/* =========================================================
   8. CATEGORY STRIP (Bitcoin/Altcoin/DeFi/NFT/GameFi..) đề xuất UI/UX
========================================================= */
.tmh-cat-strip{
  display:flex;gap:10px;overflow-x:auto;padding:4px 0 12px;margin-bottom:6px;
  scrollbar-width:thin;
}
.tmh-cat-strip::-webkit-scrollbar{height:5px;}
.tmh-cat-strip::-webkit-scrollbar-thumb{background:var(--tmh-border);border-radius:3px;}
.tmh-cat-strip a{
  flex-shrink:0;background:#fff;border:1px solid var(--tmh-border);
  padding:8px 18px;border-radius:20px;font-size:13.5px;font-weight:700;color:var(--tmh-text);
}
.tmh-cat-strip a:hover,.tmh-cat-strip a.is-active{
  background:var(--tmh-primary);color:#fff;border-color:var(--tmh-primary);
}

/* =========================================================
   9. SINGLE POST
========================================================= */
.tmh-single-header{max-width:840px;margin:0 auto 20px;}
.tmh-single-header .tmh-cat{
  background:var(--tmh-primary);color:#fff;font-size:12px;font-weight:700;
  padding:4px 12px;border-radius:4px;text-transform:uppercase;display:inline-block;
}
.tmh-single-header h1{font-size:30px;margin:14px 0 12px;line-height:1.35;}
.tmh-single-meta{
  display:flex;flex-wrap:wrap;gap:16px;align-items:center;color:var(--tmh-text-light);
  font-size:13.5px;border-top:1px solid var(--tmh-border);border-bottom:1px solid var(--tmh-border);
  padding:12px 0;
}
.tmh-single-meta img.avatar{width:32px;height:32px;border-radius:50%;}
.tmh-share-buttons{display:flex;gap:8px;margin-left:auto;}
.tmh-share-buttons a{
  width:32px;height:32px;border-radius:50%;background:var(--tmh-bg);
  display:flex;align-items:center;justify-content:center;color:var(--tmh-text);
}
.tmh-share-buttons a:hover{background:var(--tmh-primary);color:#fff;}
.tmh-single-thumb{max-width:840px;margin:20px auto;border-radius:var(--tmh-radius);overflow:hidden;}
.tmh-single-content{
  max-width:840px;margin:0 auto;font-size:17px;line-height:1.85;
}
.tmh-single-content h2{font-size:23px;margin-top:1.6em;}
.tmh-single-content h3{font-size:19px;margin-top:1.4em;}
.tmh-single-content img{border-radius:6px;margin:1.2em 0;}
.tmh-single-content blockquote{
  border-left:4px solid var(--tmh-primary);margin:1.6em 0;padding:6px 20px;
  background:var(--tmh-bg);font-style:italic;color:var(--tmh-text-light);
}
.tmh-single-content a{text-decoration:underline;}
.tmh-single-tags{max-width:840px;margin:24px auto;display:flex;gap:8px;flex-wrap:wrap;}
.tmh-single-tags a{
  background:var(--tmh-bg);border:1px solid var(--tmh-border);padding:6px 14px;
  border-radius:16px;font-size:13px;color:var(--tmh-text);
}
.tmh-author-box{
  max-width:840px;margin:30px auto;background:#fff;border-radius:var(--tmh-radius);
  padding:20px;display:flex;gap:16px;box-shadow:var(--tmh-shadow);
}
.tmh-author-box img{width:64px;height:64px;border-radius:50%;flex-shrink:0;}
.tmh-related-posts{max-width:840px;margin:30px auto 0;}

/* =========================================================
   10. FOOTER
========================================================= */
.tmh-footer{background:var(--tmh-dark);color:#aeb6c6;margin-top:50px;padding-top:44px;}
.tmh-footer-grid{
  display:grid;grid-template-columns:1fr;gap:32px;padding-bottom:30px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
@media(min-width:768px) and (max-width:991px){.tmh-footer-grid{grid-template-columns:1fr 1fr;}}
@media(min-width:992px){.tmh-footer-grid{grid-template-columns:2fr 1fr 1fr 1fr;}}
.tmh-footer-col h4{color:#fff;font-size:15px;text-transform:uppercase;margin-bottom:16px;}
.tmh-footer-col p{font-size:13.5px;line-height:1.7;}

/* Logo ở cột đầu footer: chỉ mang tính nhận diện thương hiệu, không nên to như logo header */
.tmh-footer-logo{margin-bottom:14px;line-height:0;}
.tmh-footer-logo img{max-height:34px;width:auto;}
.tmh-footer-logo .custom-logo-link{display:inline-block;}
.tmh-footer-logo h4{margin:0;font-size:20px;text-transform:none;letter-spacing:-0.3px;}
.tmh-footer-col ul li{margin-bottom:9px;}
.tmh-footer-col ul li a{color:#aeb6c6;font-size:13.5px;}
.tmh-footer-col ul li a:hover{color:var(--tmh-primary);}
.tmh-footer-social{display:flex;gap:10px;margin-top:14px;}
.tmh-footer-social a{
  width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;color:#fff;
}
.tmh-footer-social a:hover{background:var(--tmh-primary);}
.tmh-footer-bottom{
  display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center;
  padding:20px 0;font-size:13px;
}
.tmh-footer-bottom ul{display:flex;gap:16px;flex-wrap:wrap;}
.tmh-footer-bottom a{color:#aeb6c6;}
.tmh-footer-bottom a:hover{color:var(--tmh-primary);}

/* Back to top */
.tmh-back-to-top{
  position:fixed;right:22px;bottom:22px;width:44px;height:44px;border-radius:50%;
  background:var(--tmh-primary);color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:var(--tmh-shadow-lg);opacity:0;visibility:hidden;transform:translateY(10px);
  transition:.2s ease;z-index:400;border:none;font-size:18px;
}
.tmh-back-to-top.is-visible{opacity:1;visibility:visible;transform:translateY(0);}

/* =========================================================
   11. MISC / UTILITIES
========================================================= */
.tmh-breadcrumb{font-size:13px;color:var(--tmh-text-light);margin-bottom:16px;max-width:840px;}
.tmh-breadcrumb a{color:var(--tmh-text-light);}
.tmh-breadcrumb a:hover{color:var(--tmh-primary);}
.tmh-empty-state{text-align:center;padding:60px 20px;background:#fff;border-radius:var(--tmh-radius);}
.tmh-search-form{display:flex;max-width:500px;margin:0 auto 20px;gap:8px;}
.tmh-search-form input{flex:1;padding:10px 14px;border:1px solid var(--tmh-border);border-radius:6px;}
.tmh-search-form button{background:var(--tmh-primary);color:#fff;border:none;padding:10px 18px;border-radius:6px;font-weight:700;}
.tmh-comments{max-width:840px;margin:30px auto 0;}
.tmh-sticky-badge{background:var(--tmh-accent);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:4px;margin-right:6px;}

/* =========================================================
   12. RESPONSIVE TỔNG THỂ - Laptop / Tablet / Mobile
   (Yêu cầu: giao diện phải đổi hợp lý theo TỪNG thiết bị,
   không chỉ nhảy cóc giữa 2-3 mốc. Quy ước breakpoint dùng
   chung trong toàn theme:
     ≥1440px  Màn hình lớn / Laptop 15-17"
     1200-1439px  Laptop tiêu chuẩn
     992-1199px   Laptop nhỏ / Tablet ngang (iPad landscape)
     768-991px    Tablet dọc (iPad, Android tablet)
     576-767px    Mobile lớn (ngang) / Tablet nhỏ
     481-575px    Mobile trung
     380-480px    Mobile nhỏ (iPhone SE, Android nhỏ)
     ≤379px       Mobile rất nhỏ
========================================================= */

/* ---- ≥1440px: màn hình lớn, nới rộng khoảng đọc, không kéo giãn card quá to ---- */
@media(min-width:1440px){
  .tmh-single-content{font-size:17.5px;}
  .tmh-hero-primary,.tmh-hero-primary img{min-height:400px;}
}

/* ---- 992-1199px: Laptop nhỏ / Tablet ngang ----
   Menu chính vẫn hiện (từ 992px) nhưng thu gọn khoảng cách;
   ô tìm kiếm desktop ẩn (chỉ hiện từ 1200px) → dùng ô trượt xuống. */
@media(max-width:1199px) and (min-width:992px){
  .tmh-primary-nav > ul > li > a{padding:0 12px;font-size:14px;}
  .tmh-hero{gap:18px;}
  .site-main-layout.has-sidebar{grid-template-columns:1fr 300px;gap:24px;}
}

/* ---- ≤991px: Tablet dọc trở xuống ----
   Menu ngang chuyển thành drawer mobile; layout 2 cột (nội dung + sidebar)
   chuyển thành 1 cột xếp dọc, sidebar xuống dưới nội dung chính. */
@media(max-width:991px){
  .site-main-layout{padding-top:20px;grid-template-columns:1fr;}
  .site-main-layout.has-sidebar{grid-template-columns:1fr;}
  .tmh-header-inner{padding:12px 0;gap:12px;}
  .tmh-hero{margin-top:16px;gap:18px;}
  .tmh-hero-primary,.tmh-hero-primary img{min-height:280px;}
  .tmh-hero-primary-content h2{font-size:22px;}
}

/* ---- 768-991px: Tablet dọc (iPad chân dung...) ----
   Grid tin tức đã tự về 3 cột (xem quy tắc chung ở mục 7), chỉ bổ sung
   riêng cho topbar để không vỡ dòng trên tablet. */
@media(max-width:991px) and (min-width:768px){
  .tmh-hero-sub{grid-template-columns:1fr 1fr;}
  .tmh-topbar .tmh-ticker-prices{display:none;} /* Ẩn ticker giá để topbar không vỡ dòng trên tablet */
}

/* ---- 576-767px: Mobile lớn / Tablet nhỏ ----
   Grid 3→2 cột, ẩn topbar phụ, thu nhỏ hero, footer 2 cột. */
@media(max-width:767px){
  .tmh-hero-sub{grid-template-columns:1fr 1fr;}
  .tmh-cat-strip a{padding:7px 14px;font-size:13px;}
  .tmh-single-header h1{font-size:24px;}
  .tmh-section-head h2{font-size:17px;}
  .tmh-related-posts .tmh-news-grid{grid-template-columns:repeat(2,1fr)!important;}
  .tmh-footer-grid{grid-template-columns:1fr 1fr;gap:24px;}
}

@media(max-width:575px){
  .tmh-topbar .container{height:auto;flex-wrap:wrap;padding:6px 0;gap:6px;}
  .tmh-topbar-right{gap:10px;}
  .tmh-ticker-prices{display:none;} /* Ưu tiên không gian cho social/ngày trên màn rất hẹp */
  .tmh-logo a{font-size:22px;}
  .tmh-header-actions{gap:8px;}
  .tmh-cta-price{padding:8px 12px;font-size:12px;}
}

/* ---- ≤480px: Mobile trung/nhỏ ----
   Grid tin tức về 1 cột, hero sub về 1 cột, footer về 1 cột,
   giảm padding container để tận dụng bề ngang màn hình nhỏ. */
@media(max-width:480px){
  .container{padding:0 14px;}
  .tmh-hero{padding:0 14px;}
  .tmh-news-grid{grid-template-columns:1fr;gap:16px;}
  .tmh-hero-sub{grid-template-columns:1fr;}
  .tmh-related-posts .tmh-news-grid{grid-template-columns:1fr!important;}
  .tmh-footer-grid{grid-template-columns:1fr;gap:26px;text-align:left;}
  .tmh-footer-bottom{flex-direction:column;align-items:flex-start;gap:10px;}
  .tmh-hero-primary,.tmh-hero-primary img{min-height:220px;}
  .tmh-hero-primary-content{padding:16px;}
  .tmh-hero-primary-content h2{font-size:19px;}
  .tmh-sidebar-widget{padding:14px;}
  .tmh-single-content{font-size:16px;}
  .tmh-single-header h1{font-size:21px;}
  .tmh-author-box{flex-direction:column;text-align:center;}
  .tmh-mobile-nav{width:88vw;right:-88vw;}
}

/* ---- 380-480px: Mobile nhỏ (giữ khoảng đệm để không bị "chật") ---- */
@media(max-width:420px){
  .tmh-hero-sub-item img{width:80px;height:60px;}
  .tmh-popular-rank{font-size:19px;width:24px;}
  .tmh-card-body{padding:12px;}
  .tmh-card-body h3{font-size:14px;}
}

/* ---- ≤379px: Mobile rất nhỏ (iPhone SE cỡ nhỏ, Android cỡ nhỏ) ---- */
@media(max-width:379px){
  .tmh-logo a{font-size:19px;}
  .tmh-cta-price{display:none;} /* Ẩn nút CTA giá để tránh vỡ layout trên màn quá hẹp */
  .tmh-ticker-label{padding:0 10px;font-size:11.5px;}
  .tmh-ticker-track a{margin-right:32px;font-size:13px;}
  .tmh-header-search,.tmh-mobile-search-form input{font-size:13px;}
  .tmh-single-meta{gap:10px;}
  .tmh-share-buttons{margin-left:0;width:100%;justify-content:flex-start;margin-top:8px;}
}

/* ---- Thiết bị màn hình cảm ứng: bỏ hover-only tương tác (submenu/desktop hover)
   để tránh tình trạng phải bấm 2 lần trên tablet cảm ứng mới vào được submenu. ---- */
@media (hover: none) and (pointer: coarse){
  .tmh-primary-nav ul ul{position:static;opacity:1;visibility:visible;transform:none;
    display:none;box-shadow:none;border-radius:0;background:transparent;}
  .tmh-primary-nav li.tmh-submenu-open > ul{display:block;}
}
