/*
Theme Name: VMTECHS Premium
Theme URI: https://vmtechs.com
Author: VMTECHS Team
Author URI: https://vmtechs.com
Description: A premium, modern, and fully optimized WordPress theme for Windows troubleshooting and tech support websites. Features dark mode, AdSense optimization, SEO-friendly markup, and mobile-first responsive design.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
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: vmtechs
Tags: tech-blog, windows-support, responsive, dark-mode, seo-optimized, adsense-ready

VMTECHS Premium Theme - WordPress Theme for Tech Support Websites
*/

/* CSS Variables for Easy Customization — WCAG AA contrast */
:root {
    --primary-color: #0078d4;
    --secondary-color: #106ebe;
    --accent-color: #00b4d8;
    --link-color: #0066b8;
    --link-hover: #004e8c;
    /* High-contrast text on light backgrounds */
    --text-primary: #0f172a;      /* ~16:1 on white */
    --text-secondary: #334155;    /* ~8:1 on white — readable body/meta */
    --text-muted: #475569;        /* ~6:1 — still AA for large text */
    --text-on-accent: #ffffff;
    /* Fixed heading colors (light mode) — 6 completely distinct vibrant colors */
    --heading-1: #1d4ed8;         /* H1: Royal Blue */
    --heading-2: #7c3aed;         /* H2: Vivid Purple / Violet */
    --heading-3: #059669;         /* H3: Emerald Green */
    --heading-4: #ea580c;         /* H4: Vivid Orange / Amber */
    --heading-5: #0891b2;         /* H5: Bright Teal / Cyan */
    --heading-6: #e11d48;         /* H6: Crimson / Rose */
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --border-color: #cbd5e1;
    --code-bg: #f1f5f9;
    --code-text: #0f172a;
    --pre-bg: #0f172a;
    --pre-text: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Dark Mode — support both data-theme and html.dark (Tailwind style) */
[data-theme="dark"],
html.dark,
body.dark-mode {
    --primary-color: #3b9eff;
    --secondary-color: #60a5fa;
    --accent-color: #22d3ee;
    --link-color: #7dd3fc;
    --link-hover: #bae6fd;
    /* High-contrast text on dark backgrounds */
    --text-primary: #f8fafc;      /* near-white on dark navy */
    --text-secondary: #cbd5e1;    /* light slate — readable meta/excerpts */
    --text-muted: #94a3b8;        /* muted but still legible */
    --text-on-accent: #0f172a;
    /* Fixed heading colors (dark mode) — 6 completely distinct vibrant colors */
    --heading-1: #60a5fa;         /* H1: Bright Sky / Royal Blue */
    --heading-2: #c084fc;         /* H2: Bright Violet / Purple */
    --heading-3: #34d399;         /* H3: Bright Emerald Green */
    --heading-4: #fb923c;         /* H4: Bright Orange / Amber */
    --heading-5: #22d3ee;         /* H5: Bright Cyan / Teal */
    --heading-6: #fb7185;         /* H6: Bright Rose / Pink */
    --bg-primary: #0b1220;
    --bg-secondary: #111a2e;
    --bg-tertiary: #1e293b;
    --border-color: #334155;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --pre-bg: #020617;
    --pre-text: #e2e8f0;
    color-scheme: dark;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== GLOBAL READABILITY / CONTRAST FIXES ========== */

/* =========================================================
   FIXED HEADING HIERARCHY — DISTINCT COLOR & SIZE PER LEVEL
   ========================================================= */

/* H1: Royal Blue (Size: 2.5rem / 40px) */
h1, h1 a, h1 a:visited,
.h1, .h1 a,
.single-post-title, .single-post-title a,
h1.entry-title, h1.entry-title a {
    color: var(--heading-1) !important;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

/* H2: Vivid Purple / Violet (Size: 2rem / 32px) */
h2, h2 a, h2 a:visited,
.h2, .h2 a,
.section-title, .section-title a,
.archive-title, .archive-title a,
.post-content-full h2, .post-content-full h2 a,
.vmt-prose h2, .vmt-prose h2 a,
.entry-content h2, .entry-content h2 a,
h2.entry-title, h2.entry-title a,
h2.wp-block-heading, h2.wp-block-heading a {
    color: var(--heading-2) !important;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
}

/* H3: Emerald Green (Size: 1.625rem / 26px) */
h3, h3 a, h3 a:visited,
.h3, .h3 a,
.post-title, .post-title a,
.widget-title, .widget-title a,
.footer-widget-title, .footer-widget-title a,
.footer-section h3, .footer-section h3 a,
.author-info h3, .author-info h3 a,
.contact-info-item h3, .contact-info-item h3 a,
.post-content-full h3, .post-content-full h3 a,
.vmt-prose h3, .vmt-prose h3 a,
.entry-content h3, .entry-content h3 a,
h3.wp-block-heading, h3.wp-block-heading a {
    color: var(--heading-3) !important;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.3;
}

/* H4: Vivid Orange / Amber (Size: 1.375rem / 22px) */
h4, h4 a, h4 a:visited,
.h4, .h4 a,
.comment-title, .comment-title a,
.popular-post-info h4, .popular-post-info h4 a,
.post-content-full h4, .post-content-full h4 a,
.vmt-prose h4, .vmt-prose h4 a,
.entry-content h4, .entry-content h4 a,
h4.wp-block-heading, h4.wp-block-heading a {
    color: var(--heading-4) !important;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.35;
}

/* H5: Bright Cyan / Teal (Size: 1.125rem / 18px) */
h5, h5 a, h5 a:visited,
.h5, .h5 a,
.post-content-full h5, .post-content-full h5 a,
.vmt-prose h5, .vmt-prose h5 a,
.entry-content h5, .entry-content h5 a,
h5.wp-block-heading, h5.wp-block-heading a {
    color: var(--heading-5) !important;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

/* H6: Crimson / Rose (Size: 1rem / 16px) */
h6, h6 a, h6 a:visited,
.h6, .h6 a,
.post-content-full h6, .post-content-full h6 a,
.vmt-prose h6, .vmt-prose h6 a,
.entry-content h6, .entry-content h6 a,
h6.wp-block-heading, h6.wp-block-heading a {
    color: var(--heading-6) !important;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Ensure links in headings never inherit generic link/text color and stay underlined on hover */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.single-post-title a, .section-title a, .post-title a, .widget-title a {
    text-decoration: none;
}
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.single-post-title a:hover, .section-title a:hover, .post-title a:hover, .widget-title a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

p, li, dd, dt, td, th, label, figcaption,
.entry-content, .post-content, .post-content-full,
.vmt-prose, .post-excerpt, .author-bio, .comment-content {
    color: var(--text-primary);
}

/* Secondary / meta text — still meets AA contrast */
.post-meta, .post-meta *,
.breadcrumbs, .breadcrumbs *,
.archive-meta, .archive-description,
.footer-description, .footer-bottom,
.stat-label, .popular-post-views,
.adsense-label, .nav-subtitle,
time, .posted-on, .byline, .cat-links, .tags-links {
    color: var(--text-secondary) !important;
}

a {
    color: var(--link-color);
    transition: color 0.2s ease;
}
a:hover, a:focus {
    color: var(--link-hover);
}
/* Titles/cards keep primary text; links inside inherit unless styled */
.post-title a, .entry-title a, .site-logo,
.widget a, .footer-section a, .popular-post-info a {
    color: var(--text-primary);
    text-decoration: none;
}
.post-title a:hover, .entry-title a:hover,
.widget a:hover, .footer-section a:hover,
.popular-post-info a:hover {
    color: var(--link-color);
}

/* Category / topic badges — always readable */
.post-category, .vmt-badge, .cat-badge, .topic-badge {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none;
}
[data-theme="dark"] .post-category,
html.dark .post-category,
[data-theme="dark"] .vmt-badge,
html.dark .vmt-badge {
    background-color: rgba(59, 158, 255, 0.2) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 158, 255, 0.35);
}

/* Code & pre */
code, kbd, samp {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}
pre {
    background-color: var(--pre-bg) !important;
    color: var(--pre-text) !important;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
}
pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
}

/* Forms */
input, textarea, select {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Tables */
table { color: var(--text-primary); }
th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}
td { border-color: var(--border-color); color: var(--text-primary); }

/* Selection */
::selection {
    background: rgba(0, 120, 212, 0.25);
    color: var(--text-primary);
}
[data-theme="dark"] ::selection,
html.dark ::selection {
    background: rgba(59, 158, 255, 0.35);
    color: #f8fafc;
}

/* Override common Tailwind muted utilities that break in dark mode */
[data-theme="dark"] .text-slate-400,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-gray-400,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-zinc-400,
[data-theme="dark"] .text-zinc-500,
html.dark .text-slate-400,
html.dark .text-slate-500,
html.dark .text-slate-600,
html.dark .text-gray-400,
html.dark .text-gray-500,
html.dark .text-gray-600,
html.dark .text-zinc-400,
html.dark .text-zinc-500 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900,
html.dark .text-slate-700,
html.dark .text-slate-800,
html.dark .text-slate-900,
html.dark .text-gray-700,
html.dark .text-gray-800,
html.dark .text-gray-900 {
    color: var(--text-primary) !important;
}

/* Light-mode hard-coded near-white text on light bg */
:root:not([data-theme="dark"]):not(.dark) .text-white\/60,
:root:not([data-theme="dark"]):not(.dark) .text-white\/70,
:root:not([data-theme="dark"]):not(.dark) .text-white\/80 {
    /* Keep white on colored hero/sections only — handled below */
}

/* Cards & surfaces always use theme text */
.post-card, .vmt-card, .widget, .single-article,
.author-box, .comment, .related-posts article {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.post-card .post-excerpt,
.vmt-card p,
.widget p,
.widget li {
    color: var(--text-secondary);
}

/* Hero stays high-contrast white-on-brand */
.hero-section, .hero-section * {
    color: #ffffff;
}
.hero-section a { color: #ffffff; text-decoration: underline; }
.hero-section .stat-label { color: rgba(255, 255, 255, 0.9) !important; }

/* Archive header on brand gradient */
.archive-header, .archive-header * {
    color: #ffffff !important;
}

/* Prose / topic content blocks (single posts & guides) */
.vmt-prose,
.post-content-full,
.entry-content {
    color: var(--text-primary);
    font-size: 1.0625rem;
    line-height: 1.85;
}
/* Prose / article headings keep their fixed level colors */
.vmt-prose h1, .post-content-full h1, .entry-content h1 { color: var(--heading-1) !important; }
.vmt-prose h2, .post-content-full h2, .entry-content h2 { color: var(--heading-2) !important; }
.vmt-prose h3, .post-content-full h3, .entry-content h3 { color: var(--heading-3) !important; }
.vmt-prose h4, .post-content-full h4, .entry-content h4 { color: var(--heading-4) !important; }
.vmt-prose h5, .post-content-full h5, .entry-content h5 { color: var(--heading-5) !important; }
.vmt-prose h6, .post-content-full h6, .entry-content h6 { color: var(--heading-6) !important; }
.vmt-prose p, .vmt-prose li,
.post-content-full p, .post-content-full li,
.entry-content p, .entry-content li {
    color: var(--text-primary) !important;
}
.vmt-prose a, .post-content-full a, .entry-content a {
    color: var(--link-color) !important;
    font-weight: 600;
}
.vmt-prose a:hover, .post-content-full a:hover, .entry-content a:hover {
    color: var(--link-hover) !important;
}
.vmt-prose strong, .post-content-full strong, .entry-content strong {
    color: var(--text-primary);
    font-weight: 700;
}
.vmt-prose blockquote, .post-content-full blockquote, .entry-content blockquote {
    color: var(--text-secondary);
    border-left-color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Sidebar lists */
.widget ul li,
.widget_categories li,
.widget_recent_entries li,
.tagcloud a {
    color: var(--text-secondary);
}
.tagcloud a:hover {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
}

/* Footer */
.site-footer {
    color: var(--text-secondary);
}
.site-footer h3, .site-footer .footer-widget-title {
    color: var(--heading-3) !important;
}
.site-footer a {
    color: var(--text-secondary);
}
.site-footer a:hover {
    color: var(--link-color);
}

/* Comments */
.comment-author, .comment-author a {
    color: var(--text-primary) !important;
}
.comment-metadata, .comment-metadata a {
    color: var(--text-muted) !important;
}

/* Pagination */
.page-numbers, .nav-links a {
    color: var(--text-primary);
    border-color: var(--border-color);
    background-color: var(--bg-primary);
}
.page-numbers.current {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

/* Placeholder / empty states */
.no-results, .not-found, .empty-state {
    color: var(--text-secondary);
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Header Styles */
.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    flex-wrap: nowrap !important;
    gap: 1rem;
    min-width: 0; /* allow flex children to shrink instead of wrap-forcing */
}
.site-header .container {
    overflow-x: auto;
    overflow-y: hidden;
}
@media (max-width: 768px) {
    .header-container {
        gap: 0.5rem;
    }
}

/* ============================================================
   SITE TITLE / LOGO — bulletproof single-line rule.
   !important on every relevant property guarantees this can
   never be re-broken by heading rules, Tailwind utilities, or
   future edits — the text always stays on ONE line.
   ============================================================ */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0; /* required for text-overflow ellipsis to work inside flex */
    max-width: 45vw;
}
.site-logo,
.site-title,
.site-branding a,
.site-branding h1,
.site-branding .site-title {
    display: inline-block !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle;
}
@media (max-width: 1024px) {
    .site-logo,
    .site-title,
    .site-branding a,
    .site-branding h1,
    .site-branding .site-title {
        font-size: 1.05rem !important;
    }
}
@media (max-width: 768px) {
    .site-branding { max-width: 60vw; }
    .site-logo,
    .site-title,
    .site-branding a,
    .site-branding h1,
    .site-branding .site-title {
        font-size: 0.95rem !important;
    }
}

/* ============================================================
   PRIMARY NAVIGATION — every label stays on ONE line.
   flex-shrink:0 on each item prevents flexbox from squeezing
   a menu item down to the point where its text wraps.
   ============================================================ */
.main-navigation {
    min-width: 0;
    /* No overflow:hidden here — the outer .site-header .container already
       scrolls horizontally (see above) if there isn't room for every
       item, so nothing gets clipped or forced to wrap. */
}
.main-navigation ul {
    display: none;
    list-style: none;
    gap: 1.25rem;
    flex-wrap: nowrap !important;
    align-items: center;
}

@media (min-width: 768px) {
    .main-navigation ul {
        display: flex;
        flex-wrap: nowrap !important;
    }
}

.main-navigation ul li,
.nav-menu li,
.footer-menu li {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.main-navigation a,
.nav-menu a,
.footer-menu a {
    display: inline-block !important;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap !important;
    font-size: 0.92rem;
}
@media (max-width: 1200px) {
    .main-navigation ul { gap: 1rem; }
    .main-navigation a,
    .nav-menu a,
    .footer-menu a {
        font-size: 0.85rem;
    }
}
@media (max-width: 1024px) {
    .main-navigation ul { gap: 0.75rem; }
    .main-navigation a,
    .nav-menu a,
    .footer-menu a {
        font-size: 0.8rem;
    }
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle,
.dark-mode-toggle,
.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.search-toggle:hover,
.dark-mode-toggle:hover,
.mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Main Content Layout */
.site-content {
    padding: 3rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 320px;
    }
}

/* Featured Guides Section */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--heading-2);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--heading-3);
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--heading-3);
}

/* AdSense Zones — clean placeholder boxes, no labels.
   Visibility and height are controlled per zone from the Customizer
   (Appearance -> Customize -> Advertisements). */
.adsense-zone,
.adsense-zone.vmt-ad {
    display: block;
    width: 100%;
    min-height: 90px;
    background-color: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}
.adsense-zone.vmt-ad:empty::before {
    content: none; /* placeholder stays an empty dashed box */
}
/* Real ad units render flush inside the box */
.adsense-zone ins,
.adsense-zone iframe,
.adsense-zone > div[id^="google_ads"] {
    display: block;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--heading-3);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

/* Single Post */
.single-post-header {
    margin-bottom: 2rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--heading-1);
}

.post-content-full {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content-full h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--heading-2);
}

.post-content-full h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem;
    color: var(--heading-3);
}

.post-content-full p {
    margin-bottom: 1.5rem;
}

.post-content-full img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comments */
.comments-section {
    margin-top: 3rem;
}

.comment {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    z-index: 2000;
    padding: 2rem;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
}

.mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* Print Styles */
/* Force theme color inheritance so nested topic text never sticks to browser defaults */
.site-content, .site-main, main, article, .post, .page {
    color: var(--text-primary);
}
.site-content a:not(.post-category):not(.btn-download):not(.btn-primary):not(.btn-load-more):not(h1 a):not(h2 a):not(h3 a):not(h4 a):not(h5 a):not(h6 a):not(.post-title a):not(.widget-title a):not(.section-title a):not(.single-post-title a):not(.entry-title a) {
    color: var(--link-color);
}

/* Soft surfaces for secondary panels */
.widget, .sidebar .widget {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}
.widget-title {
    color: var(--heading-3) !important;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Ensure button labels stay white on brand buttons */
.btn-download, .btn-load-more, .btn-primary, .newsletter-form button,
.search-submit, .comment-form .form-submit {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}
.btn-download:hover, .btn-load-more:hover, .btn-primary:hover,
.newsletter-form button:hover {
    background-color: var(--secondary-color) !important;
    color: #ffffff !important;
}

/* =========================================================
   CUSTOMIZER PER-ITEM EDIT SHORTCUTS (blue pencil icons)
   Core styles the circle; this keeps placement sensible on
   cards, menu items, widgets and full-bleed blocks.
   ========================================================= */
.customize-partial-edit-shortcut.vmt-shortcut,
.customize-partial-edit-shortcut.vmt-shortcut .customize-partial-edit-shortcut-button {
    pointer-events: auto !important;
    cursor: pointer !important;
}
.customize-partial-edit-shortcut.vmt-shortcut {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 99999;
    opacity: 0.9;
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 0;
    padding: 0;
    border: none;
    background: transparent;
}
.customize-partial-edit-shortcut.vmt-shortcut:hover {
    opacity: 1;
    transform: scale(1.08);
}
/* On menu rows place the pencil just outside the left edge */
.main-navigation li.menu-item > .vmt-shortcut,
.nav-menu li > .vmt-shortcut,
.footer-menu li > .vmt-shortcut,
.social-menu li > .vmt-shortcut,
.mobile-navigation li > .vmt-shortcut {
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
}
.main-navigation li.menu-item:hover > .vmt-shortcut,
.nav-menu li:hover > .vmt-shortcut {
    transform: translateY(-50%) scale(1.08);
}
/* Widgets & cards: top-right reads better than top-left */
.widget > .vmt-shortcut,
.post-card > .vmt-shortcut,
.adsense-zone > .vmt-shortcut {
    top: 8px;
    left: auto;
    right: 8px;
}
/* Section headings sit inline at the left edge */
.section-title > .vmt-shortcut {
    top: 50%;
    left: -34px;
    transform: translateY(-50%);
}
.section-title { position: relative; }

/* Responsive heading scale (small screens) — colors stay fixed */
@media (max-width: 767px) {
    h1, .single-post-title, .entry-title { font-size: 2rem; }
    h2, .section-title, .archive-title { font-size: 1.625rem; }
    h3, .post-title, .widget-title { font-size: 1.375rem; }
    h4, .comment-title, .popular-post-info h4 { font-size: 1.2rem; }
    h5 { font-size: 1.0625rem; }
    h6 { font-size: 1rem; }
    .hero-title { font-size: 2rem; }
}

@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .adsense-zone {
        display: none;
    }
    body, .post-content-full, .vmt-prose {
        color: #000 !important;
        background: #fff !important;
    }
}
