/*
Theme Name: WangTech
Theme URI: https://www.wangdoo.com
Author: Mr Wangdoo
Author URI: https://www.wangdoo.com
Description: A bold tech-news magazine theme for independent publications — portal-style header with drawer menu, featured story grid with editors' picks, and a responsive news card river.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wangtech
Tags: news, magazine, two-columns, custom-menu, featured-images, threaded-comments
*/

:root{
  --wt-accent:#e63946;
  --wt-accent-dark:#c1252f;
  --wt-logo:#2c5282;
  --wt-logo-dark:#1f3a5f;
  --wt-ink:#16161d;
  --wt-ink-soft:#3d3d46;
  --wt-grey:#6e6e78;
  --wt-line:#e6e6ec;
  --wt-bg:#ffffff;
  --wt-bg-alt:#f7f7fa;
  --wt-max:1280px;
  --wt-font-display:"Inter Tight",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --wt-font-body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--wt-font-body);
  color:var(--wt-ink);
  background:var(--wt-bg);
  line-height:1.6;
  font-size:17px;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--wt-accent);text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid var(--wt-accent);outline-offset:2px}

.wt-wrap{max-width:var(--wt-max);margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden;word-wrap:normal!important}

/* ============ Header row 1 ============ */
.wt-header{background:#fff;position:sticky;top:0;z-index:80;box-shadow:0 1px 0 var(--wt-line)}
.wt-header-top{display:flex;align-items:center;gap:18px;height:64px}

.wt-burger{
  background:none;border:0;cursor:pointer;padding:8px;border-radius:8px;
  display:flex;flex-direction:column;gap:5px;flex:none;
}
.wt-burger span{display:block;width:22px;height:2.5px;background:var(--wt-ink);border-radius:2px;transition:transform .2s}
.wt-burger:hover{background:var(--wt-bg-alt)}

.wt-logo,
.wt-logo .wt-logo-brand,
.wt-logo .wt-logo-tag{
  color:var(--wt-logo)!important;
}
.wt-logo{
  font-family:var(--wt-font-display);font-weight:800;font-size:26px;letter-spacing:-0.6px;
  white-space:nowrap;flex:none;
}
.wt-logo:hover,
.wt-logo:hover .wt-logo-brand,
.wt-logo:hover .wt-logo-tag{text-decoration:none;color:var(--wt-logo-dark)!important}
.wt-logo .wt-logo-tag{font-weight:700;margin-left:6px}

.wt-search-pill{
  flex:1;display:flex;align-items:center;max-width:680px;margin:0 auto;
  background:var(--wt-bg-alt);border:1px solid var(--wt-line);border-radius:999px;
  padding:4px 4px 4px 20px;min-width:0;
}
.wt-search-pill input[type=search]{
  flex:1;border:0;background:transparent;font:inherit;font-size:15px;min-width:0;outline:none;
}
.wt-search-pill button{
  flex:none;background:var(--wt-accent);color:#fff;border:0;border-radius:999px;
  width:58px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.wt-search-pill button:hover{background:var(--wt-accent-dark)}
.wt-search-pill:focus-within{border-color:var(--wt-accent)}

.wt-header-actions{flex:none;margin-left:auto}
.wt-btn-pill{
  display:inline-block;border:1.5px solid var(--wt-line);border-radius:999px;padding:8px 20px;
  font-family:var(--wt-font-display);font-weight:700;font-size:14px;color:var(--wt-ink);
}
.wt-btn-pill:hover{border-color:var(--wt-accent);color:var(--wt-accent);text-decoration:none}

/* ============ Header row 2: nav strip ============ */
.wt-nav-strip{background:#fbfbfd;border-top:1px solid var(--wt-line)}
.wt-nav-strip ul{display:flex;list-style:none;gap:4px;overflow-x:auto;scrollbar-width:none}
.wt-nav-strip ul::-webkit-scrollbar{display:none}
.wt-nav-strip li{flex:none;position:relative}
.wt-nav-strip a{
  display:block;padding:11px 13px;font-family:var(--wt-font-display);
  font-weight:600;font-size:14.5px;color:var(--wt-ink);
}
.wt-nav-strip a:hover{color:var(--wt-accent);text-decoration:none}
.wt-nav-strip .current-menu-item > a{color:var(--wt-accent)}
.wt-nav-strip li.menu-item-has-children > a::after{
  content:"";display:inline-block;margin-left:6px;width:6px;height:6px;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
}
.wt-nav-strip .sub-menu{
  display:none;position:absolute;top:100%;left:0;min-width:200px;background:#fff;
  border:1px solid var(--wt-line);border-radius:10px;box-shadow:0 10px 28px rgba(20,20,40,.12);
  padding:8px;z-index:90;
}
.wt-nav-strip li:hover > .sub-menu,
.wt-nav-strip li:focus-within > .sub-menu{display:block}
.wt-nav-strip .sub-menu li{display:block}
.wt-nav-strip .sub-menu a{padding:9px 12px;border-radius:7px}
.wt-nav-strip .sub-menu a:hover{background:var(--wt-bg-alt)}

/* ============ Drawer (burger menu) ============ */
.wt-drawer-overlay{
  position:fixed;inset:0;background:rgba(12,10,22,.5);opacity:0;visibility:hidden;
  transition:opacity .25s;z-index:98;
}
.wt-drawer-overlay.is-open{opacity:1;visibility:visible}
.wt-drawer{
  position:fixed;top:0;left:0;bottom:0;width:300px;max-width:85vw;background:#fff;z-index:99;
  transform:translateX(-105%);transition:transform .28s ease;display:flex;flex-direction:column;
  box-shadow:8px 0 30px rgba(20,20,40,.18);
}
.wt-drawer.is-open{transform:translateX(0)}
.wt-drawer-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--wt-line);
}
.wt-drawer-head .wt-logo{font-size:21px}
.wt-drawer-close{
  background:var(--wt-bg-alt);border:0;border-radius:999px;width:36px;height:36px;
  font-size:20px;line-height:1;cursor:pointer;color:var(--wt-ink);
}
.wt-drawer-close:hover{background:var(--wt-line)}
.wt-drawer-nav{overflow-y:auto;padding:12px 10px;flex:1}
.wt-drawer-nav ul{list-style:none}
.wt-drawer-nav a{
  display:block;padding:12px 14px;border-radius:9px;
  font-family:var(--wt-font-display);font-weight:600;font-size:16px;color:var(--wt-ink);
}
.wt-drawer-nav a:hover{background:var(--wt-bg-alt);color:var(--wt-accent);text-decoration:none}
.wt-drawer-nav .sub-menu{margin-left:14px;border-left:2px solid var(--wt-line)}
.wt-drawer-nav .sub-menu a{font-weight:500;font-size:15px;color:var(--wt-ink-soft)}
.wt-drawer-foot{padding:16px 20px;border-top:1px solid var(--wt-line);font-size:13px;color:var(--wt-grey)}
body.wt-drawer-active{overflow:hidden}

/* ============ Eyebrow / meta ============ */
.wt-eyebrow{
  font-family:var(--wt-font-display);font-weight:700;font-size:12px;letter-spacing:1.4px;
  text-transform:uppercase;color:var(--wt-accent);display:inline-block;margin-bottom:8px;
}
.wt-eyebrow:hover{color:var(--wt-accent-dark);text-decoration:none}
.wt-meta{font-size:13px;color:var(--wt-grey)}
.wt-meta a{color:var(--wt-grey)}

/* ============ Today in tech head ============ */
.wt-today{margin:30px 0 22px}
.wt-today h1{
  font-family:var(--wt-font-display);font-weight:800;font-size:clamp(28px,4vw,40px);
  letter-spacing:-0.8px;line-height:1.1;
}
.wt-today p{color:var(--wt-ink-soft);margin-top:6px;font-size:17px}

/* ============ Featured grid ============ */
.wt-featured{
  display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) minmax(0,.95fr);
  gap:34px;margin-bottom:54px;
}
.wt-card{display:block}
.wt-card:hover{text-decoration:none}
.wt-card-img{border-radius:12px;overflow:hidden;background:#0c0f1a}
.wt-card-img img{width:100%;object-fit:contain;transition:transform .35s ease}
.wt-card:hover .wt-card-img img{transform:scale(1.03)}
.wt-card h2,.wt-card h3{font-family:var(--wt-font-display);color:var(--wt-ink);letter-spacing:-0.3px;line-height:1.22}
.wt-card:hover h2,.wt-card:hover h3{color:var(--wt-accent)}
.wt-card .wt-meta{margin-top:8px}

.wt-lead .wt-card-img img{height:400px;object-position:center}
.wt-lead h2{font-weight:800;font-size:clamp(24px,2.6vw,32px);margin-top:16px}
.wt-lead p{color:var(--wt-ink-soft);font-size:15.5px;margin-top:8px}

.wt-featured-mid{display:flex;flex-direction:column;gap:28px}
.wt-featured-mid .wt-card-img img{height:185px}
.wt-featured-mid h3{font-weight:700;font-size:19px;margin-top:12px}

/* Editors' picks */
.wt-picks h2{
  font-family:var(--wt-font-display);font-weight:800;font-size:20px;letter-spacing:-0.3px;
  margin-bottom:14px;
}
.wt-picks ul{list-style:none}
.wt-picks li{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--wt-line)}
.wt-picks li:first-child{padding-top:0}
.wt-pick-thumb{flex:none;width:72px;height:72px;border-radius:10px;overflow:hidden;background:var(--wt-bg-alt)}
.wt-pick-thumb img{width:100%;height:100%;object-fit:cover}
.wt-picks a{font-family:var(--wt-font-display);font-weight:700;font-size:14.5px;line-height:1.35;color:var(--wt-ink)}
.wt-picks a:hover{color:var(--wt-accent);text-decoration:none}
.wt-picks .wt-meta{margin-top:5px;font-size:12.5px}

/* ============ News grid ============ */
.wt-section-label{
  font-family:var(--wt-font-display);font-weight:800;font-size:24px;letter-spacing:-0.4px;
  margin:0 0 20px;
}
.wt-section-label span{color:var(--wt-accent)}
.wt-section-label a{color:var(--wt-ink)}
.wt-section-label a:hover{color:var(--wt-accent);text-decoration:none}
.wt-cat-row{margin-bottom:48px}
.wt-news{margin-bottom:60px}
.wt-news-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px}
.wt-news-grid .wt-card-img img{height:170px}
.wt-news-grid h3{font-weight:700;font-size:16.5px;margin-top:11px}

/* ============ Archive river (paged / archives / search) ============ */
.wt-main{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:48px;margin:36px 0 60px}
.wt-story{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;padding:24px 0;border-bottom:1px solid var(--wt-line)}
.wt-story-thumb{border-radius:10px;overflow:hidden;background:var(--wt-bg-alt)}
.wt-story-thumb img{width:100%;height:160px;object-fit:cover;transition:transform .35s ease}
.wt-story:hover .wt-story-thumb img{transform:scale(1.04)}
.wt-story h3{font-family:var(--wt-font-display);font-weight:800;font-size:22px;line-height:1.25;letter-spacing:-0.3px}
.wt-story h3 a{color:var(--wt-ink)}
.wt-story h3 a:hover{color:var(--wt-accent);text-decoration:none}
.wt-story p{margin-top:8px;font-size:15px;color:var(--wt-ink-soft)}
.wt-story .wt-meta{margin-top:10px}

/* Sidebar */
.wt-side{border-left:1px solid var(--wt-line);padding-left:36px}
.wt-side .widget{margin-bottom:40px}
.wt-side .widget-title,
.wt-side h2.widget-title{
  font-family:var(--wt-font-display);font-weight:800;font-size:17px;letter-spacing:-0.2px;
  border-bottom:3px solid var(--wt-accent);padding-bottom:10px;margin-bottom:16px;
}
.wt-trending{list-style:none;counter-reset:trend}
.wt-trending li{
  counter-increment:trend;display:flex;gap:16px;align-items:flex-start;
  padding:14px 0;border-bottom:1px solid var(--wt-line);
}
.wt-trending li::before{
  content:counter(trend);font-family:var(--wt-font-display);font-weight:800;font-size:28px;
  line-height:1;color:var(--wt-accent);min-width:30px;
}
.wt-trending a{font-family:var(--wt-font-display);font-weight:700;font-size:15.5px;line-height:1.35;color:var(--wt-ink)}
.wt-trending a:hover{color:var(--wt-accent);text-decoration:none}
.wt-side ul{list-style:none}
.wt-side ul li{padding:8px 0;border-bottom:1px solid var(--wt-line);font-size:15px}

/* ============ Single / page ============ */
.wt-article{max-width:760px;margin:44px auto 70px}
.wt-article-header .wt-eyebrow{font-size:13px}
.wt-article-title{
  font-family:var(--wt-font-display);font-weight:800;font-size:clamp(30px,5vw,44px);
  line-height:1.12;letter-spacing:-0.8px;margin:6px 0 14px;
}
.wt-article-meta{display:flex;gap:14px;align-items:center;padding:16px 0;border-top:1px solid var(--wt-line);border-bottom:1px solid var(--wt-line);margin:22px 0}
.wt-article-meta .avatar{border-radius:50%;border:2px solid var(--wt-accent)}
.wt-byline strong{font-family:var(--wt-font-display);font-size:15px}
.wt-byline div{font-size:13px;color:var(--wt-grey)}
.wt-featured-img{border-radius:12px;overflow:hidden;margin:24px 0}
.wt-content{font-size:18px;line-height:1.75;color:#222229}
.wt-content > *+*{margin-top:1.2em}
.wt-content h2{font-family:var(--wt-font-display);font-weight:800;font-size:28px;letter-spacing:-0.4px;margin-top:1.6em;padding-left:14px;border-left:4px solid var(--wt-accent)}
.wt-content h3{font-family:var(--wt-font-display);font-weight:700;font-size:22px;margin-top:1.4em}
.wt-content blockquote{border-left:4px solid var(--wt-accent);padding:6px 0 6px 20px;font-style:italic;color:var(--wt-ink-soft)}
.wt-content ul,.wt-content ol{padding-left:1.4em}
.wt-content img{border-radius:10px}
.wt-content table{border-collapse:collapse;width:100%}
.wt-content th,.wt-content td{border:1px solid var(--wt-line);padding:10px 12px;text-align:left;font-size:15px}
.wt-content th{background:var(--wt-bg-alt);font-family:var(--wt-font-display)}
.wt-tags{margin:34px 0 0;display:flex;flex-wrap:wrap;gap:8px}
.wt-tags a{
  background:var(--wt-bg-alt);border:1px solid var(--wt-line);border-radius:999px;
  padding:6px 14px;font-size:13px;font-weight:600;color:var(--wt-ink-soft);
}
.wt-tags a:hover{border-color:var(--wt-accent);color:var(--wt-accent);text-decoration:none}

/* ============ Archive head ============ */
.wt-archive-head{margin:40px 0 10px}
.wt-archive-head h1{font-family:var(--wt-font-display);font-weight:800;font-size:clamp(28px,4vw,40px);letter-spacing:-0.6px}
.wt-archive-head .wt-eyebrow{font-size:13px}
.wt-archive-head p{color:var(--wt-grey);margin-top:8px;max-width:70ch}

/* ============ Pagination ============ */
.wt-pagination{display:flex;gap:8px;flex-wrap:wrap;margin:34px 0}
.wt-pagination .page-numbers{
  display:inline-block;padding:9px 16px;border:1px solid var(--wt-line);border-radius:8px;
  font-family:var(--wt-font-display);font-weight:700;font-size:14px;color:var(--wt-ink);
}
.wt-pagination .page-numbers.current,.wt-pagination .page-numbers:hover{
  background:var(--wt-accent);border-color:var(--wt-accent);color:#fff;text-decoration:none;
}

/* ============ Comments ============ */
.wt-comments{max-width:760px;margin:0 auto 70px}
.wt-comments .comment-list{list-style:none}
.wt-comments .comment{padding:18px 0;border-bottom:1px solid var(--wt-line)}
.wt-comments input,.wt-comments textarea{
  width:100%;border:1px solid var(--wt-line);border-radius:8px;padding:10px 12px;font:inherit;
}
.wt-comments .submit{
  background:var(--wt-accent);color:#fff;border:0;border-radius:8px;padding:11px 22px;
  font-family:var(--wt-font-display);font-weight:700;cursor:pointer;width:auto;
}
.wt-comments .submit:hover{background:var(--wt-accent-dark)}

/* ============ Footer ============ */
.wt-footer-pro{background:var(--wt-ink);color:#d4d2dd;margin-top:auto}
.wt-footer-grid{
  max-width:var(--wt-max);margin:0 auto;padding:48px 20px 28px;
  display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:48px;
}
.wt-footer-pro .wt-logo{font-size:23px}
.wt-footer-pro .wt-logo,
.wt-footer-pro .wt-logo .wt-logo-brand,
.wt-footer-pro .wt-logo .wt-logo-tag{color:#93c5fd!important}
.wt-footer-pro .wt-logo:hover,
.wt-footer-pro .wt-logo:hover .wt-logo-brand,
.wt-footer-pro .wt-logo:hover .wt-logo-tag{color:#bfdbfe!important}
.wt-foot-blurb{font-size:14px;line-height:1.7;color:#b8b5c4;margin:14px 0 18px;max-width:34ch}
.wt-foot-col h4{
  font-family:var(--wt-font-display);font-weight:700;font-size:13px;letter-spacing:1.2px;
  text-transform:uppercase;color:#fff;margin-bottom:14px;
}
.wt-foot-col ul{list-style:none}
.wt-foot-col li{margin-bottom:10px}
.wt-foot-col li a{color:#d4d2dd;font-size:14.5px}
.wt-foot-col li a:hover{color:#fff}
.wt-social-icons{display:flex;gap:12px}
.wt-social-icons a{
  display:flex;align-items:center;justify-content:center;width:38px;height:38px;
  border-radius:50%;background:#2a2a38;color:#e2e0ea;transition:background .2s,color .2s;
}
.wt-social-icons a:hover{background:var(--wt-logo);color:#fff}
.wt-foot-bottom{
  border-top:1px solid #2b2b36;max-width:var(--wt-max);margin:0 auto;
  padding:18px 20px;text-align:center;font-size:13px;color:#a5a2b2;
}

/* ============ 404 / empty ============ */
.wt-empty{text-align:center;margin:90px auto;max-width:560px}
.wt-empty h1{font-family:var(--wt-font-display);font-weight:800;font-size:40px;letter-spacing:-0.6px}
.wt-empty p{color:var(--wt-grey);margin:14px 0 24px}
.wt-empty .wt-search-pill{margin:0 auto;max-width:420px}

/* ============ Responsive ============ */
@media (max-width:1080px){
  .wt-featured{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}
  .wt-picks{grid-column:1 / -1;border-top:1px solid var(--wt-line);padding-top:24px}
  .wt-news-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:980px){
  .wt-main{grid-template-columns:1fr;gap:40px}
  .wt-side{border-left:0;padding-left:0;border-top:1px solid var(--wt-line);padding-top:30px}
  .wt-header-actions{display:none}
}
@media (max-width:760px){
  .wt-footer-grid{grid-template-columns:1fr;gap:32px;padding:36px 20px 24px}
  .wt-nav-strip{display:none}
  .wt-featured{grid-template-columns:1fr;gap:30px}
  .wt-lead .wt-card-img img{height:240px}
  .wt-news-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  .wt-news-grid .wt-card-img img{height:130px}
  .wt-story{grid-template-columns:1fr;gap:12px}
  .wt-story-thumb img{height:200px}
  .wt-logo{font-size:21px}
  .wt-header-top{gap:10px}
}
@media (max-width:480px){
  .wt-search-pill{padding-left:14px}
  .wt-search-pill button{width:46px;height:32px}
  .wt-news-grid{grid-template-columns:1fr}
  .wt-news-grid .wt-card-img img{height:190px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important}
}
