/*
Theme Name: MBSMPRO Dynamic
Theme URI: https://mbsmpro.com
Author: MBSM Group
Author URI: https://mbsmpro.com
Description: Dynamic SEO-100/100 AdSense-ready WordPress theme for MBSMPRO. Auto-generates header links from all site content. Mobile-first, AMP-compatible.
Version: 2.0.0
License: GPL v2
Text Domain: mbsmpro
Tags: seo, adsense, responsive, dynamic, dark-mode, amp, schema, blog
*/

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    --primary: #ff6b00;
    --primary-dark: #e65100;
    --primary-light: #ff9800;
    --primary-glow: rgba(255,107,0,0.15);
    --bg-dark: #0a0c10;
    --bg-body: #0f1117;
    --bg-card: #151821;
    --bg-hover: #1e212b;
    --bg-elevated: #222633;
    --text-main: #e4e6eb;
    --text-muted: #8b92a8;
    --text-heading: #ffffff;
    --text-inverse: #0a0c10;
    --border: #2a2e3b;
    --border-light: #353a4a;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --ads-bg: #1a1d26;
    --ads-border: #2d313e;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1320px;
    --header-height: 64px;
    --header-height-mobile: 56px;
    --sidebar-width: 340px;
    --content-gap: 32px;
    --section-padding: 80px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; -webkit-text-size-adjust:100%; }
body { font-family:var(--font-main); background:var(--bg-body); color:var(--text-main); line-height:1.6; min-height:100vh; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility; }
a { color:var(--primary); text-decoration:none; transition:var(--transition); }
a:hover { color:var(--primary-light); }
img { max-width:100%; height:auto; display:block; }
img[src*="ads"], .adsbygoogle { display:block; margin:0 auto; }
figure, picture { margin:0; }
ul, ol { list-style:none; }
input, button, textarea, select { font:inherit; color:inherit; }
button { cursor:pointer; border:none; background:none; }
::selection { background:var(--primary); color:#fff; }

/* ============================================
   ACCESSIBILITY & SKIP LINKS
   ============================================ */
.skip-link { position:absolute; top:-40px; left:0; background:var(--primary); color:#fff; padding:8px 16px; z-index:10000; font-weight:600; font-size:0.875rem; }
.skip-link:focus { top:0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[aria-hidden="true"] { pointer-events:none; }

/* ============================================
   UTILITIES
   ============================================ */
.container { max-width:var(--max-width); margin:0 auto; padding:0 20px; }
.container-narrow { max-width:900px; margin:0 auto; padding:0 20px; }
.flex { display:flex; }
.flex-col { flex-direction:column; }
.items-center { align-items:center; }
.justify-between { justify-content:space-between; }
.gap-2 { gap:8px; }
.gap-4 { gap:16px; }
.gap-6 { gap:24px; }
.text-center { text-align:center; }
.w-full { width:100%; }
.hidden { display:none !important; }

/* ============================================
   ADSENSE CONTAINERS
   ============================================ */
.ad-container { background:var(--ads-bg); border:1px solid var(--ads-border); border-radius:var(--radius); padding:16px; text-align:center; overflow:hidden; min-height:90px; }
.ad-container::before { content:attr(data-label); display:block; font-size:0.65rem; text-transform:uppercase; letter-spacing:1.5px; color:var(--text-muted); margin-bottom:8px; }
.ad-header { margin-bottom:24px; }
.ad-content-top { margin:32px 0; }
.ad-content-mid { margin:40px 0; }
.ad-sidebar { margin-bottom:24px; min-height:250px; }
.ad-footer { margin-top:40px; }
.ad-infeed { margin:0 0 24px; }

/* ============================================
   HEADER - DYNAMIC MEGA MENU
   ============================================ */
.site-header { position:fixed; top:0; left:0; right:0; height:var(--header-height); background:rgba(10,12,16,0.92); backdrop-filter:blur(20px) saturate(180%); border-bottom:1px solid var(--border); z-index:1000; transition:var(--transition); }
.site-header.scrolled { box-shadow:var(--shadow-lg); background:rgba(10,12,16,0.98); }
.site-header.scrolled .header-inner { height:56px; }

.header-inner { display:flex; align-items:center; justify-content:space-between; height:var(--header-height); transition:var(--transition); }

/* Branding */
.site-branding { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.site-logo { display:flex; align-items:center; gap:2px; font-size:1.5rem; font-weight:900; color:var(--text-heading); letter-spacing:-1px; line-height:1; }
.site-logo .logo-mbsm { color:#fff; }
.site-logo .logo-pro { color:var(--primary); }
.site-logo:hover { opacity:0.9; }

/* Dynamic Navigation */
.main-nav { flex:1; margin:0 32px; }
.nav-list { display:flex; align-items:center; gap:4px; overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none; }
.nav-list::-webkit-scrollbar { display:none; }
.nav-item { position:relative; flex-shrink:0; }
.nav-link { display:flex; align-items:center; gap:6px; color:var(--text-muted); font-size:0.8125rem; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; padding:8px 14px; border-radius:var(--radius-sm); white-space:nowrap; }
.nav-link:hover, .nav-link.current { color:var(--text-heading); background:var(--bg-hover); }
.nav-link .nav-icon { width:16px; height:16px; opacity:0.7; }
.nav-link:hover .nav-icon { opacity:1; }

/* Mega Dropdown */
.nav-item.has-children:hover .mega-dropdown { opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto; }
.mega-dropdown { position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%) translateY(8px); width:720px; max-width:90vw; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px; opacity:0; visibility:hidden; transition:var(--transition); pointer-events:none; box-shadow:var(--shadow-lg); z-index:1001; }
.mega-dropdown::before { content:''; position:absolute; top:-6px; left:50%; transform:translateX(-50%) rotate(45deg); width:12px; height:12px; background:var(--bg-card); border-left:1px solid var(--border); border-top:1px solid var(--border); }
.mega-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
.mega-section h4 { font-size:0.75rem; text-transform:uppercase; letter-spacing:1px; color:var(--primary); margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.mega-section ul { display:flex; flex-direction:column; gap:4px; }
.mega-section a { display:block; color:var(--text-muted); font-size:0.875rem; padding:6px 8px; border-radius:var(--radius-sm); }
.mega-section a:hover { color:var(--text-heading); background:var(--bg-hover); padding-left:12px; }
.mega-section .mega-count { font-size:0.75rem; color:var(--text-muted); opacity:0.6; margin-left:auto; }

/* Header Search */
.header-search { position:relative; width:280px; flex-shrink:0; }
.header-search input { width:100%; background:var(--bg-hover); border:1px solid var(--border); border-radius:30px; padding:10px 40px 10px 18px; color:var(--text-main); font-size:0.875rem; transition:var(--transition); }
.header-search input:focus { outline:none; border-color:var(--primary); background:var(--bg-elevated); box-shadow:0 0 0 3px var(--primary-glow); }
.header-search input::placeholder { color:var(--text-muted); opacity:0.6; }
.header-search button { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); padding:4px; }
.header-search button:hover { color:var(--primary); }

/* Mobile Toggle */
.menu-toggle { display:none; width:40px; height:40px; align-items:center; justify-content:center; color:var(--text-heading); border-radius:var(--radius-sm); }
.menu-toggle:hover { background:var(--bg-hover); }
.menu-toggle svg { transition:var(--transition); }
.menu-toggle[aria-expanded="true"] svg { transform:rotate(90deg); }

/* ============================================
   HERO - DYNAMIC
   ============================================ */
.hero { margin-top:var(--header-height); padding:100px 0 80px; background:linear-gradient(160deg, var(--bg-body) 0%, #121520 50%, var(--bg-dark) 100%); position:relative; overflow:hidden; }
.hero::before { content:''; position:absolute; inset:0; background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b00' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity:0.6; }
.hero::after { content:''; position:absolute; top:-30%; right:-10%; width:500px; height:500px; background:radial-gradient(circle, var(--primary-glow) 0%, transparent 70%); pointer-events:none; }

.hero-inner { position:relative; z-index:1; display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center; }
.hero-content { max-width:600px; }
.hero-badge { display:inline-flex; align-items:center; gap:8px; background:var(--primary-glow); border:1px solid rgba(255,107,0,0.2); color:var(--primary); padding:6px 14px; border-radius:20px; font-size:0.8125rem; font-weight:600; margin-bottom:24px; }
.hero h1 { font-size:3.5rem; font-weight:900; color:var(--text-heading); line-height:1.1; margin-bottom:20px; letter-spacing:-1px; }
.hero h1 .highlight { color:var(--primary); position:relative; }
.hero h1 .highlight::after { content:''; position:absolute; bottom:4px; left:0; width:100%; height:8px; background:var(--primary-glow); z-index:-1; border-radius:2px; }
.hero-desc { font-size:1.125rem; color:var(--text-muted); margin-bottom:32px; line-height:1.7; max-width:520px; }
.hero-stats { display:flex; gap:32px; margin-bottom:32px; }
.hero-stat { display:flex; flex-direction:column; }
.hero-stat-number { font-size:1.75rem; font-weight:800; color:var(--primary); line-height:1; }
.hero-stat-label { font-size:0.75rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; margin-top:4px; }
.hero-cta-group { display:flex; gap:12px; flex-wrap:wrap; }
.hero-cta { display:inline-flex; align-items:center; gap:8px; background:var(--primary); color:#fff; padding:14px 28px; border-radius:var(--radius); font-weight:700; font-size:0.9375rem; transition:var(--transition); box-shadow:0 4px 16px rgba(255,107,0,0.25); }
.hero-cta:hover { background:var(--primary-dark); color:#fff; transform:translateY(-2px); box-shadow:0 8px 30px rgba(255,107,0,0.35); }
.hero-cta-secondary { display:inline-flex; align-items:center; gap:8px; background:transparent; color:var(--text-heading); padding:14px 28px; border-radius:var(--radius); font-weight:700; font-size:0.9375rem; border:1px solid var(--border); transition:var(--transition); }
.hero-cta-secondary:hover { background:var(--bg-hover); border-color:var(--border-light); color:var(--text-heading); }

/* Hero Featured Card */
.hero-featured { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:var(--transition); }
.hero-featured:hover { border-color:var(--primary); box-shadow:var(--shadow-lg); }
.hero-featured-img { aspect-ratio:16/10; overflow:hidden; }
.hero-featured-img img { width:100%; height:100%; object-fit:cover; transition:var(--transition); }
.hero-featured:hover .hero-featured-img img { transform:scale(1.05); }
.hero-featured-content { padding:24px; }
.hero-featured-tag { display:inline-block; background:var(--primary-glow); color:var(--primary); padding:4px 12px; border-radius:4px; font-size:0.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:12px; }
.hero-featured h3 { font-size:1.25rem; font-weight:700; color:var(--text-heading); line-height:1.4; margin-bottom:12px; }
.hero-featured h3 a { color:inherit; }
.hero-featured h3 a:hover { color:var(--primary); }
.hero-featured-meta { display:flex; gap:16px; font-size:0.8125rem; color:var(--text-muted); }

/* ============================================
   INDEX / ARCHIVE - HIGH EFFICIENCY
   ============================================ */
.section-header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:32px; flex-wrap:wrap; gap:16px; }
.section-title { font-size:1.75rem; font-weight:800; color:var(--text-heading); letter-spacing:-0.5px; }
.section-title span { color:var(--primary); }
.section-desc { color:var(--text-muted); font-size:0.9375rem; margin-top:4px; }
.section-link { display:flex; align-items:center; gap:6px; color:var(--primary); font-weight:600; font-size:0.875rem; }
.section-link:hover { gap:10px; }

/* Filter Bar */
.filter-bar { display:flex; gap:8px; margin-bottom:32px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.filter-bar::-webkit-scrollbar { display:none; }
.filter-btn { padding:8px 16px; border-radius:20px; font-size:0.8125rem; font-weight:600; color:var(--text-muted); background:var(--bg-card); border:1px solid var(--border); white-space:nowrap; transition:var(--transition); }
.filter-btn:hover, .filter-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* Posts Grid v2 - More Efficient */
.posts-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:24px; }
.posts-grid.compact { grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:20px; }

.post-card-v2 { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:var(--transition); display:flex; flex-direction:column; height:100%; }
.post-card-v2:hover { transform:translateY(-6px); box-shadow:var(--shadow-lg); border-color:var(--border-light); }
.post-card-v2 .card-img { position:relative; aspect-ratio:16/10; overflow:hidden; }
.post-card-v2 .card-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.post-card-v2:hover .card-img img { transform:scale(1.08); }
.post-card-v2 .card-img .card-cat { position:absolute; top:12px; left:12px; background:var(--primary); color:#fff; padding:4px 10px; border-radius:4px; font-size:0.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; z-index:2; }
.post-card-v2 .card-img .card-cat.tech { background:var(--info); }
.post-card-v2 .card-img .card-cat.guide { background:var(--success); }
.post-card-v2 .card-img .card-cat.news { background:var(--warning); color:var(--text-inverse); }
.post-card-v2 .card-body { padding:20px; flex:1; display:flex; flex-direction:column; }
.post-card-v2 .card-title { font-size:1.0625rem; font-weight:700; color:var(--text-heading); line-height:1.4; margin-bottom:10px; }
.post-card-v2 .card-title a { color:inherit; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-card-v2 .card-title a:hover { color:var(--primary); }
.post-card-v2 .card-excerpt { color:var(--text-muted); font-size:0.875rem; line-height:1.6; margin-bottom:16px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.post-card-v2 .card-footer { display:flex; align-items:center; justify-content:space-between; padding-top:14px; border-top:1px solid var(--border); font-size:0.75rem; color:var(--text-muted); }
.post-card-v2 .card-footer .card-date { display:flex; align-items:center; gap:4px; }
.post-card-v2 .card-footer .card-read { display:flex; align-items:center; gap:4px; color:var(--primary); font-weight:600; }

/* List View Alternative */
.posts-list { display:flex; flex-direction:column; gap:16px; }
.post-list-item { display:grid; grid-template-columns:200px 1fr; gap:20px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:var(--transition); }
.post-list-item:hover { border-color:var(--border-light); box-shadow:var(--shadow); }
.post-list-item .list-img { aspect-ratio:16/10; overflow:hidden; }
.post-list-item .list-img img { width:100%; height:100%; object-fit:cover; transition:var(--transition); }
.post-list-item:hover .list-img img { transform:scale(1.05); }
.post-list-item .list-body { padding:20px 20px 20px 0; display:flex; flex-direction:column; justify-content:center; }
.post-list-item .list-meta { display:flex; gap:12px; font-size:0.75rem; color:var(--text-muted); margin-bottom:8px; text-transform:uppercase; letter-spacing:0.5px; }
.post-list-item .list-meta .cat { color:var(--primary); font-weight:700; }
.post-list-item .list-title { font-size:1.125rem; font-weight:700; color:var(--text-heading); line-height:1.4; margin-bottom:8px; }
.post-list-item .list-title a { color:inherit; }
.post-list-item .list-title a:hover { color:var(--primary); }
.post-list-item .list-excerpt { color:var(--text-muted); font-size:0.875rem; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ============================================
   SINGLE POST - NO SIDEBAR, FULL WIDTH
   ============================================ */
.single-layout { max-width:860px; margin:0 auto; padding:0 20px; }
.single-hero { padding:40px 0 32px; border-bottom:1px solid var(--border); margin-bottom:40px; }
.single-hero .breadcrumbs { display:flex; align-items:center; gap:8px; font-size:0.8125rem; color:var(--text-muted); margin-bottom:20px; flex-wrap:wrap; }
.single-hero .breadcrumbs a { color:var(--text-muted); }
.single-hero .breadcrumbs a:hover { color:var(--primary); }
.single-hero .breadcrumbs .sep { color:var(--border-light); }
.single-hero .breadcrumbs .current { color:var(--text-heading); }

.single-hero h1 { font-size:2.5rem; font-weight:900; color:var(--text-heading); line-height:1.2; letter-spacing:-0.5px; margin-bottom:20px; }
.single-hero .single-meta { display:flex; flex-wrap:wrap; gap:20px; align-items:center; color:var(--text-muted); font-size:0.875rem; }
.single-hero .single-meta span { display:flex; align-items:center; gap:6px; }
.single-hero .single-meta .author-img { width:32px; height:32px; border-radius:50%; object-fit:cover; border:2px solid var(--border); }
.single-hero .single-meta .meta-author { color:var(--text-heading); font-weight:600; }
.single-hero .single-meta .meta-cat { background:var(--primary-glow); color:var(--primary); padding:4px 12px; border-radius:20px; font-weight:600; font-size:0.75rem; }

/* Featured Image */
.single-featured { margin:0 -20px 40px; border-radius:var(--radius-lg); overflow:hidden; aspect-ratio:21/9; }
.single-featured img { width:100%; height:100%; object-fit:cover; }

/* Article Content */
.article-content { font-size:1.0625rem; line-height:1.8; color:var(--text-main); }
.article-content > * { margin-bottom:24px; }
.article-content > *:last-child { margin-bottom:0; }

.article-content h2 { font-size:1.75rem; font-weight:800; color:var(--text-heading); margin:48px 0 20px; padding-bottom:12px; border-bottom:2px solid var(--border); }
.article-content h3 { font-size:1.375rem; font-weight:700; color:var(--text-heading); margin:36px 0 16px; }
.article-content h4 { font-size:1.125rem; font-weight:700; color:var(--text-heading); margin:28px 0 12px; }

.article-content p { margin-bottom:20px; }
.article-content a { color:var(--primary); border-bottom:1px solid transparent; transition:var(--transition); }
.article-content a:hover { border-bottom-color:var(--primary); }

.article-content blockquote { background:var(--bg-hover); border-left:4px solid var(--primary); padding:24px 28px; margin:32px 0; border-radius:0 var(--radius) var(--radius) 0; font-style:italic; color:var(--text-muted); position:relative; }
.article-content blockquote::before { content:'"'; position:absolute; top:8px; left:12px; font-size:3rem; color:var(--primary); opacity:0.2; font-family:serif; line-height:1; }
.article-content blockquote p { margin-bottom:0; }
.article-content blockquote cite { display:block; margin-top:12px; font-size:0.875rem; color:var(--text-muted); font-style:normal; }

.article-content ul, .article-content ol { padding-left:24px; margin:20px 0; }
.article-content ul { list-style:disc; }
.article-content ol { list-style:decimal; }
.article-content li { margin-bottom:8px; }
.article-content li::marker { color:var(--primary); }

.article-content code { background:var(--bg-hover); padding:2px 8px; border-radius:4px; font-family:var(--font-mono); font-size:0.875em; color:var(--primary-light); word-break:break-word; }
.article-content pre { background:#06080a; padding:24px; border-radius:var(--radius); overflow-x:auto; margin:28px 0; border:1px solid var(--border); }
.article-content pre code { background:none; padding:0; color:#e6edf3; font-size:0.875rem; line-height:1.6; }

.article-content table { width:100%; border-collapse:collapse; margin:28px 0; font-size:0.9375rem; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.article-content th { background:var(--bg-hover); color:var(--text-heading); font-weight:700; padding:14px 18px; text-align:left; border-bottom:2px solid var(--primary); }
.article-content td { padding:12px 18px; border-bottom:1px solid var(--border); }
.article-content tr:last-child td { border-bottom:none; }
.article-content tr:nth-child(even) { background:rgba(255,255,255,0.02); }
.article-content tr:hover { background:rgba(255,107,0,0.03); }

.article-content img { border-radius:var(--radius); margin:24px 0; }
.article-content figure { margin:28px 0; }
.article-content figcaption { text-align:center; font-size:0.8125rem; color:var(--text-muted); margin-top:8px; }

.article-content .wp-block-embed { margin:28px 0; }
.article-content iframe { max-width:100%; border-radius:var(--radius); }

/* TOC */
.toc-box { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:24px; margin:32px 0; }
.toc-box h4 { font-size:0.875rem; text-transform:uppercase; letter-spacing:1px; color:var(--primary); margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.toc-box ul { list-style:none; padding:0; margin:0; }
.toc-box li { margin-bottom:8px; }
.toc-box a { display:flex; align-items:center; gap:8px; color:var(--text-muted); font-size:0.9375rem; padding:6px 8px; border-radius:var(--radius-sm); transition:var(--transition); }
.toc-box a:hover { color:var(--text-heading); background:var(--bg-hover); padding-left:12px; }
.toc-box a::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--border); flex-shrink:0; }
.toc-box a:hover::before { background:var(--primary); }

/* Share */
.share-bar { display:flex; align-items:center; gap:12px; padding:24px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); margin:40px 0; }
.share-bar span { font-size:0.8125rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; font-weight:600; }
.share-bar a { width:40px; height:40px; display:flex; align-items:center; justify-content:center; background:var(--bg-hover); border:1px solid var(--border); border-radius:50%; color:var(--text-muted); transition:var(--transition); }
.share-bar a:hover { background:var(--primary); border-color:var(--primary); color:#fff; transform:translateY(-3px); }

/* Tags */
.post-tags-single { display:flex; flex-wrap:wrap; gap:8px; margin:32px 0; }
.post-tags-single a { background:var(--bg-hover); color:var(--text-muted); padding:6px 14px; border-radius:20px; font-size:0.8125rem; border:1px solid var(--border); transition:var(--transition); }
.post-tags-single a:hover { background:var(--primary); color:#fff; border-color:var(--primary); }

/* Author Box */
.author-box { display:grid; grid-template-columns:80px 1fr; gap:20px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:28px; margin:40px 0; }
.author-box .author-avatar { width:80px; height:80px; border-radius:50%; object-fit:cover; border:3px solid var(--border); }
.author-box .author-name { font-size:1.125rem; font-weight:700; color:var(--text-heading); margin-bottom:4px; }
.author-box .author-role { font-size:0.8125rem; color:var(--primary); font-weight:600; margin-bottom:10px; }
.author-box .author-bio { font-size:0.9375rem; color:var(--text-muted); line-height:1.6; }
.author-box .author-social { display:flex; gap:8px; margin-top:12px; }
.author-box .author-social a { width:32px; height:32px; display:flex; align-items:center; justify-content:center; background:var(--bg-hover); border-radius:var(--radius-sm); color:var(--text-muted); font-size:0.875rem; }
.author-box .author-social a:hover { background:var(--primary); color:#fff; }

/* Related Posts */
.related-posts { margin:48px 0; }
.related-posts h3 { font-size:1.25rem; font-weight:800; color:var(--text-heading); margin-bottom:24px; display:flex; align-items:center; gap:10px; }
.related-posts h3::before { content:''; width:4px; height:24px; background:var(--primary); border-radius:2px; }
.related-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }

/* Post Navigation */
.post-nav { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:40px 0; }
.post-nav a { background:var(--bg-card); border:1px solid var(--border); padding:24px; border-radius:var(--radius); display:flex; flex-direction:column; gap:8px; transition:var(--transition); }
.post-nav a:hover { border-color:var(--primary); background:var(--bg-hover); }
.post-nav .nav-label { font-size:0.75rem; color:var(--primary); text-transform:uppercase; letter-spacing:1px; font-weight:700; }
.post-nav .nav-title { color:var(--text-heading); font-weight:700; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-nav .next { text-align:right; align-items:flex-end; }

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-hero { padding:40px 0; border-bottom:1px solid var(--border); margin-bottom:40px; }
.search-hero h1 { font-size:1.875rem; font-weight:800; color:var(--text-heading); margin-bottom:8px; }
.search-hero h1 .query { color:var(--primary); }
.search-hero .search-stats { color:var(--text-muted); font-size:0.9375rem; }
.search-form-large { display:flex; gap:12px; margin-bottom:32px; }
.search-form-large input { flex:1; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:14px 20px; color:var(--text-main); font-size:1rem; }
.search-form-large input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }
.search-form-large button { background:var(--primary); color:#fff; padding:14px 28px; border-radius:var(--radius); font-weight:700; font-size:0.9375rem; transition:var(--transition); }
.search-form-large button:hover { background:var(--primary-dark); }

/* ============================================
   SIDEBAR (ONLY ON INDEX/ARCHIVE)
   ============================================ */
.sidebar { display:flex; flex-direction:column; gap:24px; }
.widget { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:24px; }
.widget-title { font-size:0.875rem; font-weight:800; color:var(--text-heading); text-transform:uppercase; letter-spacing:1.5px; margin-bottom:20px; padding-bottom:12px; border-bottom:2px solid var(--primary); display:inline-block; }
.widget ul { display:flex; flex-direction:column; gap:4px; }
.widget li a { display:flex; align-items:center; justify-content:space-between; color:var(--text-muted); font-size:0.875rem; padding:8px 10px; border-radius:var(--radius-sm); transition:var(--transition); }
.widget li a:hover { color:var(--text-heading); background:var(--bg-hover); padding-left:14px; }
.widget li a .count { font-size:0.75rem; background:var(--bg-hover); color:var(--text-muted); padding:2px 8px; border-radius:10px; }
.widget li a:hover .count { background:var(--primary); color:#fff; }

/* Sticky Widget */
.widget-sticky { position:sticky; top:calc(var(--header-height) + 24px); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background:var(--bg-dark); border-top:1px solid var(--border); }
.footer-top { padding:64px 0 48px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr 1fr; gap:40px; }
.footer-brand .footer-logo { font-size:1.5rem; font-weight:900; color:var(--text-heading); margin-bottom:16px; letter-spacing:-0.5px; }
.footer-brand .footer-logo .pro { color:var(--primary); }
.footer-brand p { color:var(--text-muted); font-size:0.9375rem; line-height:1.7; margin-bottom:20px; }
.footer-brand .footer-contact { display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.footer-brand .footer-contact a { display:flex; align-items:center; gap:8px; color:var(--text-muted); font-size:0.875rem; }
.footer-brand .footer-contact a:hover { color:var(--primary); }
.footer-social { display:flex; gap:10px; }
.footer-social a { width:38px; height:38px; display:flex; align-items:center; justify-content:center; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-muted); transition:var(--transition); }
.footer-social a:hover { background:var(--primary); border-color:var(--primary); color:#fff; transform:translateY(-3px); }

.footer-col h4 { font-size:0.8125rem; font-weight:800; color:var(--text-heading); text-transform:uppercase; letter-spacing:1px; margin-bottom:20px; }
.footer-col ul { display:flex; flex-direction:column; gap:10px; }
.footer-col a { color:var(--text-muted); font-size:0.875rem; transition:var(--transition); display:flex; align-items:center; gap:6px; }
.footer-col a:hover { color:var(--primary); padding-left:4px; }
.footer-col a::before { content:'›'; color:var(--primary); font-weight:bold; opacity:0; transition:var(--transition); }
.footer-col a:hover::before { opacity:1; }

.footer-bottom { border-top:1px solid var(--border); padding:24px 0; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.footer-bottom p { color:var(--text-muted); font-size:0.8125rem; }
.footer-bottom-links { display:flex; gap:24px; }
.footer-bottom-links a { color:var(--text-muted); font-size:0.8125rem; }
.footer-bottom-links a:hover { color:var(--primary); }

/* ============================================
   MOBILE CONFIGURATION - COMPLETE
   ============================================ */
@media (max-width:1024px) {
    :root { --header-height:56px; }
    .hero-inner { grid-template-columns:1fr; gap:40px; }
    .hero h1 { font-size:2.5rem; }
    .content-area { grid-template-columns:1fr !important; }
    .sidebar { display:none; }
    .footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
    .related-grid { grid-template-columns:1fr 1fr; }
    .mega-dropdown { display:none !important; }
    .nav-item.has-children .nav-link::after { content:'›'; margin-left:4px; font-size:1rem; }
}

@media (max-width:768px) {
    :root { --section-padding:48px; }
    .menu-toggle { display:flex; }
    .main-nav { position:fixed; inset:var(--header-height) 0 0 0; background:var(--bg-body); border-bottom:none; padding:0; margin:0; overflow-y:auto; transform:translateX(-100%); transition:transform 0.3s cubic-bezier(0.4,0,0.2,1); z-index:999; }
    .main-nav.active { transform:translateX(0); }
    .nav-list { flex-direction:column; gap:0; padding:16px; }
    .nav-item { width:100%; border-bottom:1px solid var(--border); }
    .nav-link { padding:16px; font-size:0.9375rem; justify-content:space-between; }
    .header-search { display:none; }
    .hero { padding:60px 0 48px; }
    .hero h1 { font-size:2rem; }
    .hero-stats { gap:20px; }
    .hero-stat-number { font-size:1.5rem; }
    .hero-cta-group { flex-direction:column; }
    .hero-cta, .hero-cta-secondary { width:100%; justify-content:center; }
    .posts-grid { grid-template-columns:1fr; gap:20px; }
    .post-list-item { grid-template-columns:1fr; }
    .post-list-item .list-img { aspect-ratio:16/9; }
    .post-list-item .list-body { padding:20px; }
    .single-hero h1 { font-size:1.75rem; }
    .single-featured { margin:0 -16px 32px; border-radius:0; }
    .article-content { font-size:1rem; }
    .article-content h2 { font-size:1.375rem; }
    .article-content h3 { font-size:1.125rem; }
    .author-box { grid-template-columns:60px 1fr; gap:16px; padding:20px; }
    .author-box .author-avatar { width:60px; height:60px; }
    .related-grid { grid-template-columns:1fr; }
    .post-nav { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; gap:32px; }
    .footer-bottom { flex-direction:column; text-align:center; }
    .ad-container { padding:12px; }
    .filter-bar { gap:6px; }
    .filter-btn { padding:6px 12px; font-size:0.75rem; }
    .section-header { flex-direction:column; align-items:flex-start; }
}

@media (max-width:480px) {
    .hero h1 { font-size:1.625rem; }
    .hero-desc { font-size:1rem; }
    .single-hero h1 { font-size:1.5rem; }
    .article-content pre { padding:16px; overflow-x:scroll; }
    .article-content table { display:block; overflow-x:auto; white-space:nowrap; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(20px); }
    to { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
    from { opacity:0; }
    to { opacity:1; }
}
@keyframes slideIn {
    from { transform:translateX(-20px); opacity:0; }
    to { transform:translateX(0); opacity:1; }
}

.post-card-v2 { animation:fadeInUp 0.5s ease forwards; opacity:0; }
.post-card-v2:nth-child(1) { animation-delay:0.05s; }
.post-card-v2:nth-child(2) { animation-delay:0.1s; }
.post-card-v2:nth-child(3) { animation-delay:0.15s; }
.post-card-v2:nth-child(4) { animation-delay:0.2s; }
.post-card-v2:nth-child(5) { animation-delay:0.25s; }
.post-card-v2:nth-child(6) { animation-delay:0.3s; }

/* Reduced Motion */
@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after { animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .sidebar, .ad-container, .share-bar, .post-nav, .related-posts { display:none !important; }
    body { background:#fff; color:#000; }
    .single-layout { max-width:100%; }
}

/* ============================================
   SCHEMA / SEO HELPERS
   ============================================ */
.breadcrumb-list { display:flex; list-style:none; gap:8px; flex-wrap:wrap; }
.breadcrumb-list li { display:flex; align-items:center; gap:8px; }
.breadcrumb-list li:not(:last-child)::after { content:'/'; color:var(--border-light); }
.breadcrumb-list a { color:var(--text-muted); }
.breadcrumb-list [aria-current="page"] { color:var(--text-heading); font-weight:600; }

/* Reading Progress Bar */
.read-progress { position:fixed; top:0; left:0; height:3px; background:var(--primary); z-index:10001; transition:width 0.1s linear; }
