/*
Theme Name: WiseTech Core Theme
Theme URI: https://wisetechlist.com/wise-tech-core/
Author: WiseTechList
Author URI: https://wisetechlist.com/
Description: A fast, lightweight WordPress theme for technology blogs, tutorials, reviews, and news, with clean typography and Gutenberg support.
Version: 0.3.3
Requires at least: 6.5
Tested up to: 7.1
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: wisetech-core-theme
Tags: blog, news, one-column, grid-layout, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --wt-bg: #ffffff;
  --wt-surface: #f7f9fc;
  --wt-text: #172033;
  --wt-muted: #667085;
  --wt-border: #e7eaf0;
  --wt-accent: #2563eb;
  --wt-accent-hover: #1d4ed8;
  --wt-radius: 14px;
  --wt-shadow: 0 8px 30px rgba(16, 24, 40, .06);
  --wt-content: 760px;
  --wt-wide: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--wt-text);
  background: var(--wt-bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--wt-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wt-accent-hover); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  top: 12px; left: 12px;
  width: auto; height: auto;
  padding: 10px 14px;
  clip: auto;
  background: #fff;
  color: #111827;
  z-index: 99999;
  border-radius: 8px;
  box-shadow: var(--wt-shadow);
}

.wt-wrap { width: min(100% - 40px, var(--wt-wide)); margin-inline: auto; }
.wt-content { width: min(100% - 40px, var(--wt-content)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wt-border);
}
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.site-branding { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-branding--logo-only { gap: 0; }
.site-branding-text { min-width: 0; }
.custom-logo { display: block; max-height: 40px; width: auto; }
.site-title { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.site-title a { color: var(--wt-text); text-decoration: none; }
.site-description { margin: 2px 0 0; color: var(--wt-muted); font-size: .78rem; line-height: 1.25; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.site-nav a { display: block; padding: 8px 10px; color: #344054; font-size: .92rem; font-weight: 650; text-decoration: none; border-radius: 8px; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--wt-surface); color: var(--wt-text); }
.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--wt-border);
  background: #fff;
  color: var(--wt-text);
  padding: 8px 11px;
  border-radius: 9px;
  cursor: pointer;
}

.site-main { min-height: 65vh; }
.home-intro-hidden > .wt-wrap:first-child { padding-top: 40px; }
.archive-header, .home-header { padding: 56px 0 28px; }
.archive-header h1, .home-header h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; }
.archive-description, .home-intro { max-width: 720px; color: var(--wt-muted); font-size: 1.05rem; }
.home-intro p, .archive-description p { margin-top: 0; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 56px; }
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--wt-shadow); border-color: #d8deea; }
.post-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: #eef2f8; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.015); }
.post-card-body { padding: 18px 18px 20px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 7px 11px; color: var(--wt-muted); font-size: .78rem; line-height: 1.35; }
.post-meta a { color: inherit; text-decoration: none; }
.post-card-title { margin: 9px 0 8px; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.post-card-title a { color: var(--wt-text); text-decoration: none; }
.post-card-excerpt { margin: 0; color: #475467; font-size: .92rem; line-height: 1.6; }

.featured-post { display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; margin-bottom: 32px; border: 1px solid var(--wt-border); border-radius: 18px; background: var(--wt-surface); }
.featured-post .featured-image { min-height: 330px; background: #edf2f7; }
.featured-post .featured-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-copy { padding: clamp(28px, 5vw, 56px); align-self: center; }
.featured-label { display: inline-block; margin-bottom: 10px; color: var(--wt-accent); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.featured-title { margin: 0 0 12px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.featured-title a { color: var(--wt-text); text-decoration: none; }
.featured-copy p { margin: 0 0 18px; color: #475467; }
.read-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; text-decoration: none; }

.single-header { padding: 58px 0 24px; }
.single-header .post-meta { margin-bottom: 14px; }
.entry-title { margin: 0; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.05em; overflow-wrap: anywhere; }
.entry-deck { margin: 18px 0 0; color: var(--wt-muted); font-size: 1.18rem; line-height: 1.55; }
.entry-featured { width: min(100% - 40px, var(--wt-wide)); margin: 12px auto 38px; }
.entry-featured img { display: block; width: 100%; max-height: 700px; object-fit: cover; border-radius: 18px; }
.entry-content { padding-bottom: 34px; }
.entry-content > * { max-width: var(--wt-content); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--wt-wide); }
.entry-content > .alignfull { max-width: none; width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.2; letter-spacing: -.025em; margin-top: 1.9em; }
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content p, .entry-content li { color: #344054; }
.entry-content blockquote { margin-top: 1.6em; margin-bottom: 1.6em; padding: 4px 0 4px 20px; border-left: 4px solid var(--wt-accent); color: #344054; font-size: 1.05rem; }
.entry-content pre { overflow-x: auto; padding: 18px; background: #101828; color: #e4e7ec; border-radius: 12px; font-size: .88rem; }
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--wt-border); text-align: left; }
.entry-content th { background: var(--wt-surface); }

.post-taxonomy { width: min(100% - 40px, var(--wt-content)); margin: 0 auto 28px; padding-top: 18px; border-top: 1px solid var(--wt-border); color: var(--wt-muted); font-size: .9rem; }
.post-taxonomy a { display: inline-block; margin: 4px 4px 4px 0; padding: 5px 9px; border: 1px solid var(--wt-border); border-radius: 999px; color: #344054; text-decoration: none; }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 16px; width: min(100% - 40px, var(--wt-content)); margin: 28px auto; padding: 20px; border: 1px solid var(--wt-border); border-radius: var(--wt-radius); background: var(--wt-surface); }
.author-box img { border-radius: 50%; }
.author-box h2 { margin: 0 0 4px; font-size: 1rem; }
.author-box p { margin: 0; color: var(--wt-muted); font-size: .9rem; }
.related-posts { width: min(100% - 40px, var(--wt-wide)); margin: 48px auto; }
.related-posts h2 { margin-bottom: 18px; font-size: 1.5rem; letter-spacing: -.03em; }

.pagination { padding: 6px 0 64px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--wt-border); border-radius: 8px; text-decoration: none; color: #344054; }
.page-numbers.current { background: var(--wt-text); border-color: var(--wt-text); color: #fff; }

.search-form { display: flex; gap: 8px; max-width: 560px; }
.search-field { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: var(--wt-text); }
.search-submit { border: 0; border-radius: 9px; padding: 11px 15px; background: var(--wt-accent); color: #fff; font-weight: 700; cursor: pointer; }
.search-submit:hover { background: var(--wt-accent-hover); }

.comments-area { width: min(100% - 40px, var(--wt-content)); margin: 44px auto; }
.comments-title { font-size: 1.35rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--wt-border); }
.comment-meta { font-size: .85rem; color: var(--wt-muted); }
.comment-content p { color: #344054; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 9px;
}
.form-submit .submit { border: 0; border-radius: 9px; padding: 10px 15px; background: var(--wt-accent); color: #fff; font-weight: 700; cursor: pointer; }

.empty-state, .error-404 { padding: 72px 0; text-align: center; }
.empty-state h1, .error-404 h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.empty-state p, .error-404 p { color: var(--wt-muted); }
.empty-state .search-form, .error-404 .search-form { margin: 24px auto 0; }

.site-footer { border-top: 1px solid var(--wt-border); background: var(--wt-surface); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 32px 0; color: var(--wt-muted); font-size: .88rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: inherit; text-decoration: none; }
.footer-nav a:hover { color: var(--wt-text); }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .featured-image { min-height: 260px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; display: none; margin: 0; padding: 12px 20px 18px; border-bottom: 1px solid var(--wt-border); background: #fff; }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; }
  .site-nav a { padding: 10px 8px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wt-wrap, .wt-content { width: min(100% - 28px, var(--wt-wide)); }
  .site-description { display: none; }
  .archive-header, .home-header, .single-header { padding-top: 38px; }
  .post-grid { grid-template-columns: 1fr; gap: 18px; }
  .entry-title { font-size: clamp(2.1rem, 12vw, 3.2rem); }
  .entry-featured { width: min(100% - 28px, var(--wt-wide)); }
  .footer-inner { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 48px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Navigation submenus */
.site-nav li { position: relative; }
.site-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 110;
  display: none;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--wt-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--wt-shadow);
}
.site-nav .sub-menu li { width: 100%; }
.site-nav .sub-menu a { width: 100%; }
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: block; }

@media (max-width: 900px) {
  .site-nav .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
  }
}
