/* KHCN Pro — dedicated mobile layout (<= 767px) */
@media (max-width: 767px){
  html,body{width:100%;min-width:0;overflow-x:hidden}
  body{background:var(--bg);font-size:14px;line-height:1.55}
  .body-bg,.wraper{width:100%!important;max-width:none!important;margin:0!important;background:transparent!important}
  .wraper>header,.wraper>.second-nav,.wraper>main,.wraper>footer{width:100%!important;margin:0!important}
  .wraper>header{position:relative!important;z-index:2001!important;border-top:3px solid var(--green);background:linear-gradient(110deg,#ffffff 0%,#f8fafc 100%)!important;box-shadow:0 2px 10px rgba(0,0,0,0.03)}
  .wraper>header>.container,.wraper>main>.container{width:100%!important;max-width:none!important;padding:0 14px!important}
  #header{display:flex!important;flex-direction:column;align-items:stretch;min-height:0!important;margin:0!important}
  #header .logo{display:flex!important;justify-content:center;align-items:center;width:100%!important;min-height:78px!important;padding:10px 4px 6px!important}
  #header .logo a{display:flex;justify-content:center;width:100%}
  #header .logo img{display:block!important;width:auto!important;max-width:100%!important;max-height:72px!important;object-fit:contain}
  #header .header-utility{display:flex!important;justify-content:center!important;align-items:center;width:100%!important;min-height:40px!important;padding:2px 0 8px!important;border:0!important}
  #header .header-contact{display:none!important}
  #header .header-actions{display:flex!important;gap:7px!important}
  #header .header-actions a,#header .header-actions a.button{width:32px!important;height:32px!important;border-radius:9px!important;background:var(--soft)!important;color:var(--green)!important}
  #header .header-actions .personalArea .pa em{display:inline-block!important;visibility:visible!important;color:var(--green)!important}

  .second-nav{position:relative!important;z-index:2050!important;min-height:52px!important;background:var(--green)!important;box-shadow:0 4px 14px var(--shadow)!important}
  #menusite{position:static!important;z-index:2050!important;min-height:52px!important;background:var(--green)!important}
  #menusite>.container{width:100%!important;min-width:0!important;padding:0 14px!important}
  #menusite .navbar{position:static!important;min-height:52px!important;margin:0!important;border:0!important;background:transparent!important}
  #menusite .navbar-header{display:block!important;float:none!important;height:52px!important;min-height:52px!important;background:var(--green)!important}
  #menusite .navbar-header:after{content:'MENU';display:block;padding:15px 0;color:#fff;font-size:12px;font-weight:800;letter-spacing:.08em}
  #menusite .navbar-toggle{display:block!important;float:right!important;margin:9px 0!important;padding:8px 9px!important;border:1px solid rgba(255,255,255,.32)!important;border-radius:8px!important;background:var(--green2)!important}
  #menusite .navbar-toggle .icon-bar{width:20px;height:2px;background:#fff!important}
  /* Closed state stays compact: only the hamburger remains visible. */
  #menusite .navbar-collapse.collapse,#menusite .navbar-collapse.collapse:not(.in){display:none!important;height:0!important;padding:0!important;overflow:hidden!important}
  #menusite .navbar-collapse.collapse.in,#menusite .navbar-collapse.show{position:absolute!important;top:52px!important;transform:none!important;right:14px!important;display:block!important;width:min(320px,calc(100vw - 28px))!important;height:auto!important;max-height:calc(100vh - 100px)!important;overflow-y:auto!important;padding:8px!important;border:1px solid #d9e6df!important;border-radius:0 0 12px 12px!important;background:#fff!important;box-shadow:0 16px 32px var(--shadow)!important;z-index:2100!important}
  #menusite .navbar-nav{display:block!important;width:100%!important;min-width:0!important;margin:0!important}
  #menusite .navbar-nav>li{float:none!important;border-bottom:1px solid #edf2ef!important}
  #menusite .navbar-nav>li:last-child{border-bottom:0!important}
  #menusite .navbar-default .navbar-nav>li>a, #menusite .navbar-nav>li>a{display:block!important;padding:10px 12px!important;border-radius:7px!important;background:#fff!important;color:var(--ink)!important;font-size:13px!important;font-weight:700!important;line-height:22px!important;text-transform:uppercase;white-space:normal!important}
  #menusite .navbar-default .navbar-nav>li>a:hover,#menusite .navbar-default .navbar-nav>li.active>a,#menusite .navbar-default .navbar-nav>li.open>a,#menusite .navbar-default .navbar-nav>li.open>a:hover,#menusite .navbar-nav>li>a:hover,#menusite .navbar-nav>li.active>a,#menusite .navbar-nav>li.open>a,#menusite .navbar-nav>li.open>a:hover{background:var(--green2)!important;color:#fff!important;box-shadow:inset 3px 0 var(--gold)!important}
  #menusite .dropdown-menu{position:static!important;float:none!important;width:100%!important;margin:0!important;padding:3px 0 3px 12px!important;border:0!important;border-left:2px solid #dce9e2!important;border-radius:0!important;box-shadow:none!important}
  #menusite .dropdown-menu>li>a{padding:8px 10px!important;color:#365348!important;white-space:normal!important}

  main{min-height:0!important;padding:0 0 26px!important}
  .third-nav{margin:12px 0 14px!important}
  .third-nav>.row,.third-nav .bg{margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  .third-nav .clearfix{display:block!important}
  .third-nav .col-xs-24{width:100%!important;padding:0!important}
  .third-nav .col-sm-18{display:none!important}
  .headerSearch{display:block!important;width:100%!important;margin:0!important}
  .headerSearch .input-group{display:flex;width:100%}
  .headerSearch .form-control{height:42px!important;border:1px solid #d6e3dc!important;border-radius:10px 0 0 10px!important;background:#fff!important}
  .headerSearch .input-group-btn{width:48px}
  .headerSearch .btn-info{width:48px;height:42px!important;border:0!important;border-radius:0 10px 10px 0!important;background:var(--green)!important}

  .homepage-slider-area{display:block!important;height:auto!important;margin:0 0 14px!important}
  .homepage-slider{width:100%!important;padding:0!important}
  .homepage-slider #nvslider1,.homepage-slider .bx-wrapper,.homepage-slider .bx-viewport,.homepage-slider .bxslider,.homepage-slider .bxslider li,.homepage-slider .bxslider img{height:190px!important}
  .homepage-slider #nvslider1{overflow:hidden;border:1px solid #dce9e2;border-radius:13px;background:#eaf2ee;box-shadow:0 5px 16px rgba(7,61,41,.08)}
  .homepage-slider .bxslider img{width:100%!important;max-width:none!important;object-fit:cover!important;object-position:center!important}
  .homepage-quick-links{display:grid!important;grid-template-columns:1fr 1fr;gap:9px;width:100%!important;height:auto!important;padding:0!important}
  .homepage-quick-links>.nv-block-banners{width:100%!important;height:82px!important;margin:0!important}
  .homepage-quick-links>.nv-block-banners>a{height:82px!important;border-radius:10px!important}
  .homepage-quick-links img{width:100%!important;height:80px!important;object-fit:contain!important}
  .homepage-quick-links>.nv-block-banners:last-child{grid-column:1/-1}

  .homepage-content{display:block!important;margin:0!important}
  .homepage-main,.homepage-sidebar{float:none!important;width:100%!important;padding:0!important}
  .homepage-sidebar{margin-top:14px!important}
  #hot-news .panel-body{padding:14px!important}
  #hot-news .col-md-14,#hot-news .col-md-10{width:100%!important;padding:0!important;border:0!important}
  #hot-news .col-md-14 img{height:205px!important;border-radius:10px!important}
  #hot-news h2{font-size:20px!important}
  #hot-news .col-md-10{margin-top:16px!important}
  .panel{border-radius:12px!important;margin-bottom:14px!important}
  .panel-heading{padding:13px 15px!important;font-size:14px!important}
  .panel-body{padding:14px!important}
  .category-featured-thumb{width:112px!important;height:78px!important;margin-right:12px!important}
  .news_column>.panel>.news-card-layout{padding:14px!important}
  .news_column>.panel>.news-card-layout:has(>.news-card-thumb){grid-template-columns:104px minmax(0,1fr)!important;gap:12px!important}
  .news-card-thumb{width:104px!important;height:78px!important}
  .news-card-content h2,.news-card-content h3{font-size:16px!important}

  /* Keep every body section aligned to the same mobile gutter. */
  #body>.row,[class*="col-"]{box-sizing:border-box!important}
  #body>.row{margin-left:0!important;margin-right:0!important}
  #body>.row>[class*="col-"]{width:100%!important;float:none!important;padding-left:0!important;padding-right:0!important}
  .breadcrumb,.page_title,.cat-content,.viewcat{margin-left:0!important;margin-right:0!important}

  #footer{padding:26px 0 20px!important}
  #footer>.wraper>.container{padding:0 14px!important}
  .footer-grid{display:block!important}
  .footer-brand strong{font-size:19px!important}
  .footer-tools{margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.14)}
  .footer-tool-actions{gap:7px!important}
  .footer-tool-actions>.btn,.footer-tool-actions>.footer-back-top{font-size:11px!important;padding:0 10px!important}
  .footer-site-content .ffooter .divall{width:100%!important}
  .footer-site-content .ffooter .divall img{max-height:68px!important}
}

#menusite .navbar-default .navbar-nav > li { width: 100% !important; margin: 0 !important; }
