/*
Theme Name: ShiftWise
Theme URI: https://shiftwiseai.com
Author: Rana Usman
Author URI: https://ranausman.com
Description: Lightweight, fast theme for ShiftWise AI: free AI tools and guides on how AI is changing work, income and life. Pairs with the ShiftWise Tools plugin.
Version: 0.2.3
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: shiftwise
*/

:root {
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff;
  --brand: #3730a3; --brand-2: #4f46e5; --brand-soft: #eef2ff;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--text); background: var(--bg); }
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.02em; margin-top: 0; }
h2 { font-size: 1.55rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1.05rem; }
p { margin: 0 0 1.15em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid var(--brand-2); background: var(--brand-soft); border-radius: 0 10px 10px 0; color: #312e81; }
code { background: #f1f5f9; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
th { background: #f1f5f9; color: var(--ink); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { clip: auto; width: auto; height: auto; left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem 1rem; }

.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2.5rem); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); margin-bottom: .5rem; }
.lead { font-size: 1.15rem; color: #334155; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.2rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #312e81; color: #fff; }
.btn-ghost { background: #fff; color: #334155; border-color: var(--line); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .95rem; }
.brand-ai { color: var(--brand-2); margin-left: 2px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { height: 38px; max-height: 38px; width: auto; display: block; }
.site-footer .custom-logo { height: 32px; max-height: 32px; }
@media (max-width: 600px) { .custom-logo { height: 30px; max-height: 30px; } }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .65rem; font: inherit; cursor: pointer; }
.primary-menu { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.primary-menu a { display: block; padding: .45rem .75rem; border-radius: 8px; color: #334155; text-decoration: none; font-weight: 500; font-size: .95rem; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { background: var(--brand-soft); color: var(--brand); }
.primary-menu .sub-menu { display: none; }

/* Hero and sections */
.hero { padding: 4.5rem 0 3rem; text-align: center; }
.hero .lead { max-width: 640px; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.section { padding: 1.5rem 0 3rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.page-hero { padding: 3rem 0 1rem; }
.page-hero h1 { margin-bottom: .5rem; }

/* Post cards */
.post-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card-thumb { display: block; aspect-ratio: 16/9; background: var(--brand-soft); overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.12rem; margin: .25rem 0 .5rem; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--brand-2); }
.post-card p { color: #475569; font-size: .95rem; margin-bottom: 1rem; }
.post-meta { font-size: .85rem; color: var(--muted); margin-top: auto; }
.cat-pill { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: .15rem .55rem; border-radius: 999px; text-decoration: none; }

/* Single post / page */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; padding: 2.5rem 0 3rem; }
.content-layout.no-sidebar { grid-template-columns: minmax(0, 760px); justify-content: center; }
.entry-header { margin-bottom: 1.5rem; }
.entry-header .post-meta { margin-top: .5rem; }
.entry-thumb { margin: 0 0 1.75rem; border-radius: var(--radius); overflow: hidden; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; margin: 0 0 1.25em; }
.entry-content li { margin-bottom: .4em; }
.entry-content .wp-block-image figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.alignwide { width: min(1100px, 100vw - 2.5rem); margin-left: 50%; transform: translateX(-50%); }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--muted); }
.updated-note { font-size: .85rem; color: var(--muted); }

.author-box { display: flex; gap: 1rem; align-items: flex-start; margin: 2.5rem 0; }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.author-box p { margin: 0; font-size: .95rem; color: #475569; }

.related { margin-top: 3rem; }
.related h2 { font-size: 1.3rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; font-size: .95rem; }

/* Sidebar and widgets */
.sidebar { position: sticky; top: 96px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; }
.content-layout > * { min-width: 0; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; font-size: .95rem; }
.widget-title, .widget h2, .widget .wp-block-heading { font-size: 1rem !important; margin: 0 0 .75rem !important; }
.widget > *:last-child { margin-bottom: 0; }
.widget .wp-block-search__label { font-weight: 600; color: var(--ink); display: block; margin-bottom: .5rem; }
.widget .wp-block-search__inside-wrapper { display: flex; gap: .4rem; }
.widget .wp-block-search__input { flex: 1; min-width: 0; font: inherit; padding: .5rem .7rem; border: 1px solid #cbd5e1; border-radius: 10px; }
.widget .wp-block-search__button { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: .5rem .9rem; font: inherit; font-weight: 600; cursor: pointer; margin: 0; }
.widget .wp-block-latest-posts, .widget .wp-block-latest-comments, .widget .wp-block-archives, .widget .wp-block-categories { padding: 0; margin: 0; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .35rem 0; border-top: 1px solid var(--line); }
.widget li:first-child { border-top: 0; }
.widget a { text-decoration: none; }
.tool-widget-list a { display: block; font-weight: 600; }
.tool-widget-list span { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }

/* Ad slots: empty until widgets are added */
.ad-slot { margin: 1.75rem 0; text-align: center; min-height: 0; }
.ad-slot:empty { display: none; }
.ad-slot .widget { background: none; border: 0; padding: 0; }

/* Search, pagination, comments */
.search-form { display: flex; gap: .5rem; }
.search-form input[type=search] { flex: 1; font: inherit; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: 10px; }
.search-form button { font: inherit; }
.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: 10px; }
.comment-form .submit { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: .7rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; }

/* Footer */
.site-footer { margin-top: 3rem; padding: 2.75rem 0 2rem; background: #fff; border-top: 1px solid var(--line); font-size: .92rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr 1fr; }
.footer-grid h3 { font-size: .95rem; margin: 0 0 .75rem; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: .4rem; }
.footer-menu a { color: #475569; text-decoration: none; }
.footer-menu a:hover { color: var(--brand-2); }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }

@media (max-width: 960px) {
  .content-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .site-header { position: static; }
  .menu-toggle { display: inline-block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .nav { flex-wrap: wrap; padding: .5rem 0; }
  .primary-menu { flex-direction: column; padding-bottom: .5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2rem; }
}
.entry-thumb-credit { margin-top: .4rem; font-size: .78rem; color: var(--muted, #64748b); text-align: right; }
.entry-thumb-credit a { color: inherit; }
.entry-thumb { overflow: visible; border-radius: 0; }
.entry-thumb img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
