/*
Theme Name: TechWise
Theme URI: https://techwisetoday.com/
Author: TechWiseToday
Description: Simple, fast, colourful news theme for TechWiseToday. Header categories come from Appearance > Menus (Header Menu); the homepage shows one section per category in that menu.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: techwise
*/
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#0f172a;background:#f6f8fb;line-height:1.5}
a{color:#2563eb;text-decoration:none}a:hover{color:#1e40af}
img{max-width:100%;height:auto;display:block}
.tw-wrap{max-width:1200px;margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
/* header */
.tw-header{background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:50}
.admin-bar .tw-header{top:32px}
.tw-head{max-width:1440px;margin:0 auto;padding:0 20px;display:flex;align-items:center;gap:8px 18px;min-height:68px}
.tw-logo{font-size:24px;font-weight:800;letter-spacing:-.5px;color:#0f172a;flex:none;display:flex;align-items:center}
.tw-logo span{color:#2563eb}.tw-logo img{max-height:44px;width:auto}
.tw-nav{flex:1 1 auto;min-width:0;display:flex;justify-content:flex-end}
.tw-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:0}
.tw-nav a{display:flex;align-items:center;gap:6px;padding:22px 8px 19px;font-size:13.5px;font-weight:600;color:#1e293b;border-bottom:3px solid transparent;white-space:nowrap}
.tw-nav a:hover,.tw-nav .current-menu-item>a,.tw-nav .current-cat>a,.tw-nav .current-post-ancestor>a,.tw-nav .current-menu-parent>a{border-bottom-color:var(--c,#2563eb);color:#0f172a}
.tw-dot{width:7px;height:7px;border-radius:50%;background:var(--c,#2563eb);flex:none}
.tw-icon-btn{width:44px;height:44px;border-radius:50%;border:1px solid #e2e8f0;background:#f8fafc;color:#334155;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.tw-menu-btn{display:none}
.tw-search{display:none;border-top:1px solid #eef2f7;background:#fff}
.tw-search.open{display:block}
.tw-search form{max-width:700px;margin:0 auto;padding:14px 20px;display:flex;gap:8px}
.tw-search input[type=search]{flex:1;padding:12px 16px;border:1px solid #cbd5e1;border-radius:999px;font:inherit}
.tw-btn{padding:12px 20px;border-radius:10px;border:0;background:#2563eb;color:#fff;font:inherit;font-weight:700;cursor:pointer}
@media (max-width:1320px){
.tw-menu-btn{display:flex;margin-left:auto}
.tw-nav{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid #e2e8f0;box-shadow:0 10px 20px rgba(15,23,42,.06)}
.tw-nav.open{display:block}
.tw-nav ul{flex-direction:column;padding:8px 20px}
.tw-nav a{padding:14px 4px;border-bottom:1px solid #f1f5f9}
.tw-head{position:relative}
}
/* chips & labels */
.tw-chip{display:inline-block;font-size:12px;font-weight:700;padding:5px 12px;border-radius:999px;background:var(--s,#dbeafe);color:var(--d,#1e40af)}
.tw-kicker{font-size:12px;font-weight:700;color:var(--d,#1e40af)}
.tw-meta{font-size:13px;color:#64748b}
/* cards */
.tw-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;color:#0f172a;min-width:0}
.tw-card:hover{border-color:#cbd5e1;box-shadow:0 8px 24px rgba(15,23,42,.06);color:#0f172a}
.tw-card .tw-img{aspect-ratio:3/2;background:var(--s,#dbeafe);overflow:hidden}
.tw-card .tw-img img{width:100%;height:100%;object-fit:cover}
.tw-card .tw-img:empty,.tw-card.big .tw-img:empty{aspect-ratio:auto;height:8px}
.tw-card .tw-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px}
.tw-card h3{margin:0;font-size:16px;font-weight:700;line-height:1.35}
.tw-card.big h3{font-size:21px;font-weight:800;line-height:1.25}
.tw-card.big .tw-img{aspect-ratio:16/9}
.tw-card p{margin:0;font-size:14px;color:#475569;line-height:1.55}
/* home */
.tw-main{padding:28px 0 48px;display:flex;flex-direction:column;gap:40px}
.tw-lead{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:20px}
.tw-lead .tw-card.big h3{font-size:28px}
.tw-lead .tw-card.big p{font-size:15px}
.tw-box{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:18px 20px}
.tw-box-title{display:block;font-size:13px;font-weight:800;letter-spacing:1px;color:#2563eb;text-transform:uppercase;margin-bottom:6px}
.tw-trend a{display:flex;gap:14px;padding:12px 0;border-bottom:1px solid #f1f5f9;color:#0f172a}
.tw-trend a:last-child{border-bottom:0}
.tw-trend .n{font-size:24px;font-weight:800;color:#cbd5e1;width:28px;flex:none}
.tw-trend .t{font-size:15px;font-weight:600;line-height:1.35}
.tw-sec-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;border-bottom:3px solid var(--c);padding-bottom:10px}
.tw-sec-head h2{margin:0;font-size:24px;font-weight:800;display:flex;align-items:center;gap:10px}
.tw-sec-head h2 a{color:#0f172a}
.tw-bar{width:12px;height:28px;border-radius:4px;background:var(--c);display:inline-block}
.tw-all{font-size:14px;font-weight:700;color:var(--d)}
.tw-subs{display:flex;flex-wrap:wrap;gap:8px}
.tw-subs a{font-size:13px;font-weight:600;padding:7px 14px;border-radius:999px;background:var(--s);color:var(--d)}
.tw-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.tw-grid .big{grid-column:span 2}
.tw-section{display:flex;flex-direction:column;gap:16px}
.tw-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:14px;padding:22px;color:#64748b;font-size:14px}
.tw-news{background:#2563eb;color:#fff;border-radius:18px;padding:28px;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between}
.tw-news strong{display:block;font-size:22px}
.tw-news span{color:#dbeafe}
.tw-news .tw-btn{background:#0f172a}
@media (max-width:900px){.tw-lead{grid-template-columns:1fr}.tw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.tw-grid{grid-template-columns:1fr}.tw-grid .big{grid-column:auto}.tw-lead .tw-card.big h3{font-size:22px}}
/* single */
.tw-single{display:flex;flex-wrap:wrap;gap:32px;padding:24px 0 56px}
.tw-article{flex:999 1 640px;min-width:0;display:flex;flex-direction:column;gap:22px}
.tw-aside{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:20px}
.tw-crumbs{font-size:13px;color:#64748b;display:flex;flex-wrap:wrap;gap:6px}
.tw-title{margin:0;font-size:40px;font-weight:800;line-height:1.15;letter-spacing:-.5px}
.tw-excerpt{margin:0;font-size:18px;color:#475569;line-height:1.6}
.tw-byline{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:14px;color:#475569}
.tw-byline img{border-radius:50%}
.tw-byline b{color:#0f172a;display:block}
.tw-feat{border-radius:18px;overflow:hidden;background:var(--s,#dbeafe)}
.tw-feat img{width:100%;height:auto}
.tw-toc ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:15px}
.tw-content{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:32px 36px;font-size:18px;line-height:1.8;color:#1e293b;overflow-wrap:break-word}
.tw-content>*:first-child{margin-top:0}
.tw-content h2{font-size:28px;font-weight:800;line-height:1.3;color:#0f172a;margin:1.4em 0 .5em;scroll-margin-top:90px}
.tw-content h3{font-size:22px;font-weight:700;color:#0f172a;margin:1.2em 0 .4em}
.tw-content img{border-radius:14px;margin:8px 0}
.tw-content figure{margin:1.2em 0}
.tw-content figcaption{font-size:13px;color:#64748b;text-align:center}
.tw-content blockquote{margin:1.2em 0;background:#eff6ff;border-radius:12px;padding:16px 20px;color:#1e3a8a}
.tw-content table{width:100%;border-collapse:collapse;font-size:15px;display:block;overflow-x:auto}
.tw-content th,.tw-content td{border:1px solid #e2e8f0;padding:10px 12px;text-align:left}
.tw-content th{background:#f8fafc}
.tw-content pre{background:#0f172a;color:#e2e8f0;padding:16px;border-radius:12px;overflow-x:auto;font-size:14px}
.tw-tags{display:flex;flex-wrap:wrap;gap:8px}
.tw-tags a{font-size:13px;padding:6px 12px;border-radius:999px;background:#fff;border:1px solid #e2e8f0;color:#334155}
.tw-share{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tw-share b{font-size:14px;color:#475569;margin-right:4px}
.tw-share a{font-size:13px;font-weight:700;padding:9px 16px;border-radius:999px;background:#fff;border:1px solid #e2e8f0;color:#1e293b}
.tw-author{display:flex;flex-wrap:wrap;gap:18px;align-items:center}
.tw-author img{border-radius:50%}
.tw-author div{flex:1 1 260px}
.tw-author small{color:#64748b;font-weight:600}
.tw-author strong{display:block;font-size:18px}
.tw-author p{margin:4px 0 0;color:#475569;font-size:15px}
.tw-rel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
@media (max-width:700px){.tw-rel{grid-template-columns:1fr}.tw-title{font-size:30px}.tw-content{padding:22px 18px;font-size:17px}}
.tw-mini a{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid #f1f5f9;color:#0f172a}
.tw-mini a:last-child{border-bottom:0}
.tw-mini .th{width:64px;height:52px;border-radius:8px;background:var(--s,#dbeafe);overflow:hidden;flex:none}
.tw-mini .th img{width:100%;height:100%;object-fit:cover}
.tw-mini .t{font-size:14px;font-weight:600;line-height:1.35}
.tw-catlist a{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600;color:#1e293b;padding:7px 0}
.tw-catlist a span{display:flex;gap:8px;align-items:center}
/* page */
.tw-hero{background:#eff6ff;border-bottom:1px solid #dbeafe}
.tw-hero .tw-in{max-width:900px;margin:0 auto;padding:48px 20px;text-align:center;display:flex;flex-direction:column;gap:12px;align-items:center}
.tw-hero h1{margin:0;font-size:44px;font-weight:800;letter-spacing:-.5px;line-height:1.15}
.tw-hero p{margin:0;font-size:18px;color:#475569;max-width:640px}
.tw-page{max-width:900px;margin:0 auto;padding:36px 20px 56px}
/* archive */
.tw-arch-head{padding:36px 0 8px;display:flex;flex-direction:column;gap:10px}
.tw-arch-head h1{margin:0;font-size:36px;font-weight:800}
.tw-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:16px 0 32px}
@media (max-width:900px){.tw-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.tw-list{grid-template-columns:1fr}.tw-hero h1{font-size:32px}}
.tw-pages{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:48px}
.tw-pages .page-numbers{padding:10px 16px;border-radius:10px;background:#fff;border:1px solid #e2e8f0;color:#1e293b;font-weight:600}
.tw-pages .current{background:#2563eb;color:#fff;border-color:#2563eb}
/* comments */
.tw-comments{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:24px 28px}
.tw-comments input[type=text],.tw-comments input[type=email],.tw-comments input[type=url],.tw-comments textarea{width:100%;padding:12px 14px;border:1px solid #cbd5e1;border-radius:10px;font:inherit}
.tw-comments .submit{padding:12px 24px;border-radius:10px;border:0;background:#2563eb;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.tw-comments ol{padding-left:0;list-style:none}
/* footer */
.tw-footer{background:#0f172a;color:#cbd5e1;margin-top:20px}
.tw-foot{max-width:1200px;margin:0 auto;padding:36px 20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:24px;font-size:14px}
.tw-foot strong{font-size:20px;color:#fff;display:block;margin-bottom:6px}
.tw-foot a{color:#e2e8f0;font-weight:600;display:block;padding:3px 0}
.tw-foot ul{list-style:none;margin:0;padding:0}
.tw-copy{border-top:1px solid #1e293b;padding:14px 20px;text-align:center;font-size:13px;color:#94a3b8}

.tw-foot .tw-mail{display:inline-flex;align-items:center;gap:8px;margin-top:14px;padding:9px 14px;border:1px solid #334155;border-radius:999px;color:#fff;font-weight:600;width:max-content;max-width:100%}
.tw-foot .tw-mail:hover{border-color:#2563eb;background:#1e293b;color:#fff}
