/*
Theme Name: Smallpdf Tools Blog
Theme URI: https://smallpdft.tools
Author: Smallpdf Tools
Author URI: https://smallpdft.tools
Description: A premium, lightning-fast AdSense-ready blog theme for Smallpdf Tools. SEO & AI-engine optimised, mobile-first, full social media integration, reading progress bar, dark mode, smooth animations, and full policy compliance. Built for smallpdft.tools and partner sites.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smallpdf-tools-blog
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, custom-colors, full-width-template, dark-mode
*/

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
  --primary:         #e84040;
  --primary-dark:    #c42d2d;
  --primary-light:   #fff0f0;
  --secondary:       #1a1a2e;
  --accent:          #ff6b6b;
  --accent2:         #f59e0b;
  --text:            #1f2937;
  --text-light:      #4b5563;
  --text-muted:      #9ca3af;
  --bg:              #f8f9fa;
  --bg-white:        #ffffff;
  --bg-dark:         #1a1a2e;
  --border:          #e5e7eb;
  --border-radius:   10px;
  --border-radius-lg:16px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.06);
  --shadow:          0 2px 12px rgba(0,0,0,.08);
  --shadow-hover:    0 8px 32px rgba(0,0,0,.16);
  --transition:      0.22s ease;
  --font-sans:       'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-width:       1200px;
  --sidebar-width:   320px;
  --header-h:        70px;
}

/* Dark mode */
[data-theme="dark"] {
  --text:        #f3f4f6;
  --text-light:  #d1d5db;
  --text-muted:  #6b7280;
  --bg:          #111827;
  --bg-white:    #1f2937;
  --bg-dark:     #030712;
  --border:      #374151;
  --shadow:      0 2px 12px rgba(0,0,0,.3);
  --shadow-hover:0 8px 32px rgba(0,0,0,.4);
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; line-height: 1; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 { color: var(--text); line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.95rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; }
.lead { font-size: 1.1rem; color: var(--text-light); line-height: 1.75; }

/* =========================================
   READING PROGRESS BAR
   ========================================= */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  z-index: 9999; transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(232,64,64,.5);
}

/* =========================================
   LAYOUT
   ========================================= */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.site-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}
.site-layout.full-width { grid-template-columns: 1fr; }
.main-content-area { min-width: 0; }
@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; padding: 24px 16px; gap: 32px; }
}

/* =========================================
   ACCESSIBILITY
   ========================================= */
.skip-link {
  position: absolute; top: -50px; left: 16px; z-index: 10000;
  padding: 10px 18px; background: var(--primary); color: white;
  font-weight: 700; border-radius: 0 0 8px 8px; transition: top 0.2s;
}
.skip-link:focus { top: 3px; color: white; }
.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; }

/* =========================================
   TOP ANNOUNCEMENT BAR
   ========================================= */
.top-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent2) 100%);
  color: white; text-align: center; padding: 8px 20px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em;
  position: relative;
}
.top-bar a { color: white; text-decoration: underline; }
.top-bar-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: white; font-size: 1.1rem;
  cursor: pointer; padding: 2px 6px; line-height: 1;
}

/* =========================================
   HEADER — BOLDER & MODERN
   ========================================= */
.site-header {
  background: rgba(255,255,255,.97);
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .site-header { background: rgba(31,41,55,.97); }

.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: var(--header-h);
}

.site-branding { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; font-weight: 900;
  box-shadow: 0 3px 10px rgba(232,64,64,.4);
  flex-shrink: 0;
}

/* BOLDER title & tagline */
.site-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
[data-theme="dark"] .site-title { color: var(--text); }
.site-title span { color: var(--primary); }

.site-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Navigation */
.main-navigation ul { display: flex; align-items: center; gap: 2px; }
.main-navigation a {
  padding: 7px 14px; border-radius: 7px; font-size: 0.875rem; font-weight: 600;
  color: var(--text-light); transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { background: var(--primary-light); color: var(--primary); }
.main-navigation .menu-tools > a { background: var(--primary); color: white !important; padding: 7px 16px; }
.main-navigation .menu-tools > a:hover { background: var(--primary-dark); }
.main-navigation .menu-articles > a { background: var(--secondary); color: white !important; padding: 7px 16px; }
.main-navigation .menu-articles > a:hover { background: #2d2d4a; }

/* Header right controls */
.header-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Search */
.header-search { position: relative; }
.header-search input {
  padding: 8px 36px 8px 14px; border: 1.5px solid var(--border); border-radius: 22px;
  font-size: 0.855rem; width: 200px; outline: none; background: var(--bg);
  color: var(--text); font-family: inherit;
  transition: border-color var(--transition), width var(--transition), box-shadow var(--transition);
}
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,64,64,.12); width: 240px; background: var(--bg-white); }
.header-search button { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; }

/* Dark mode toggle */
.dark-mode-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-light); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.dark-mode-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Mobile toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: 7px; }
.menu-toggle:hover { background: var(--bg); }
.menu-toggle span { display: block; width: 23px; height: 2px; background: var(--secondary); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); transform-origin: center; }
[data-theme="dark"] .menu-toggle span { background: var(--text); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .header-search { display: none; }
  .main-navigation {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-white); border-bottom: 2px solid var(--border);
    padding: 14px 20px 18px; box-shadow: var(--shadow-hover);
    z-index: 999;
  }
  .main-navigation.active { display: block; }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-navigation a { display: block; padding: 10px 14px; font-size: 0.95rem; }
}

/* =========================================
   HERO BANNER
   ========================================= */
.hero-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, #16213e 45%, #0f3460 100%);
  color: white; padding: 80px 20px 90px; text-align: center; position: relative; overflow: hidden;
}
.hero-banner::before {
  content: ''; position: absolute; top: -100px; left: -60px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,64,64,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero-banner::after {
  content: ''; position: absolute; bottom: -80px; right: -40px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.12) 0%, transparent 65%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,64,64,.2); color: #fca5a5;
  border: 1px solid rgba(232,64,64,.35); padding: 6px 16px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 22px;
}
.hero-banner h1 { color: white; margin-bottom: 18px; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero-banner h1 span { color: #fca5a5; }
.hero-banner p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 580px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================
   BUTTONS
   ========================================= */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 9px; font-weight: 700; font-size: 0.9rem; transition: all var(--transition); font-family: inherit; line-height: 1; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 3px 12px rgba(232,64,64,.32); }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,64,64,.42); }
.btn-outline { border: 2px solid rgba(255,255,255,.4); color: white; }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: white; color: white; }
.btn-ghost { background: var(--primary-light); color: var(--primary); border: 2px solid transparent; }
.btn-ghost:hover { background: var(--primary); color: white; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #2d2d4a; color: white; transform: translateY(-1px); }

/* =========================================
   AD BLOCKS — AdSense-policy safe
   ========================================= */
.ad-block {
  display: block; overflow: hidden; margin: 20px 0; text-align: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--border-radius);
}
.ad-block::before {
  content: 'Advertisement'; display: block;
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 6px 0 2px; text-align: center;
}
.ad-leaderboard  { min-height: 100px; }
.ad-rectangle    { min-height: 260px; }
.ad-halfpage     { min-height: 610px; }
.ad-in-content   { min-height: 90px; }
.adsense-wrap .adsbygoogle { display: block; }
.ad-block-label { font-size: 0.75rem; color: var(--text-muted); }

/* Ad bar top */
.ad-bar-top { background: var(--bg); border-bottom: 1px solid var(--border); padding: 4px 20px; text-align: center; }
.ad-bar-top::before { content: 'Advertisement'; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); display: block; margin-bottom: 2px; }

/* =========================================
   BREADCRUMBS — Schema-marked
   ========================================= */
.breadcrumbs {
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  padding: 10px 0; font-size: 0.8rem; color: var(--text-muted);
}
.breadcrumbs-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--border); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 2px solid var(--border); }
.section-header h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.section-header h2::before { content: ''; display: block; width: 4px; height: 22px; background: linear-gradient(to bottom, var(--primary), var(--accent2)); border-radius: 2px; flex-shrink: 0; }
.section-link { font-size: 0.83rem; font-weight: 700; color: var(--primary); }
.section-link:hover { text-decoration: underline; }

/* =========================================
   POST CARDS
   ========================================= */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 22px; }
@media (max-width: 500px) { .posts-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--bg-white); border-radius: var(--border-radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; border: 1px solid var(--border);
  position: relative;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.post-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, var(--primary-light), #ffe4e4); position: relative; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.post-card-body { padding: 18px 22px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--primary); background: var(--primary-light); padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.post-card h3 { font-size: 1.02rem; line-height: 1.45; margin-bottom: 10px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--text-light); font-size: 0.875rem; line-height: 1.65; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { display: flex; align-items: center; gap: 12px; font-size: 0.76rem; color: var(--text-muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.read-time { display: inline-flex; align-items: center; gap: 4px; }
/* Featured card */
.post-card-featured { grid-column: 1 / -1; flex-direction: row; }
.post-card-featured .post-card-thumb { width: 44%; flex-shrink: 0; aspect-ratio: unset; min-height: 220px; }
.post-card-featured .post-card-body { padding: 28px 32px; }
.post-card-featured h3 { font-size: 1.5rem; }
@media (max-width: 640px) {
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-thumb { width: 100%; min-height: unset; aspect-ratio: 16/9; }
  .post-card-featured .post-card-body { padding: 20px; }
  .post-card-featured h3 { font-size: 1.15rem; }
}

/* "New" badge */
.post-card-new-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent2); color: white;
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 8px; border-radius: 4px;
  box-shadow: 0 2px 6px rgba(245,158,11,.4);
}

/* =========================================
   CATEGORY FILTER PILLS
   ========================================= */
.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.cat-filter-btn {
  padding: 7px 18px; border-radius: 22px; font-size: 0.83rem; font-weight: 600;
  border: 2px solid var(--border); color: var(--text-light); background: var(--bg-white);
  transition: all var(--transition); font-family: inherit;
}
.cat-filter-btn:hover, .cat-filter-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.sidebar-sticky { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 22px; }
.widget { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.widget-title { font-size: 0.82rem; font-weight: 800; color: var(--text); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: 0.05em; }
/* Recent posts */
.widget-recent-post { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.widget-recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-post:first-child { padding-top: 0; }
.widget-recent-thumb { width: 56px; height: 56px; border-radius: 7px; overflow: hidden; flex-shrink: 0; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.widget-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-body a { font-size: 0.84rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 3px; line-height: 1.4; }
.widget-recent-body a:hover { color: var(--primary); }
.widget-recent-body span { font-size: 0.73rem; color: var(--text-muted); }
/* Categories */
.widget-cat-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.widget-cat-list li:last-child { border-bottom: none; }
.widget-cat-list a { font-size: 0.875rem; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.widget-cat-list a:hover { color: var(--primary); }
.cat-count { font-size: 0.7rem; background: var(--bg); color: var(--text-muted); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); }
/* Tags */
.widget-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-pill { padding: 5px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; font-size: 0.77rem; color: var(--text-light); transition: all var(--transition); font-weight: 500; }
a.tag-pill:hover { background: var(--primary); color: white; border-color: var(--primary); }
/* Newsletter widget */
.widget-newsletter { background: linear-gradient(135deg, var(--secondary), #16213e); color: white; border: none; }
.widget-newsletter .widget-title { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.12); }
.widget-newsletter p { font-size: 0.84rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.newsletter-form input { width: 100%; padding: 10px 13px; border-radius: 8px; border: none; margin-bottom: 9px; font-size: 0.875rem; outline: none; font-family: inherit; }
.newsletter-form button { width: 100%; padding: 10px; background: var(--primary); color: white; border-radius: 8px; font-weight: 700; font-size: 0.875rem; transition: background var(--transition); font-family: inherit; }
.newsletter-form button:hover { background: var(--accent2); }
/* Social widget */
.widget-social { display: flex; flex-wrap: wrap; gap: 8px; }
.social-follow-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; color: white; transition: all var(--transition); text-decoration: none; }
.social-follow-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.2); color: white; }
.social-follow-btn.twitter   { background: #000; }
.social-follow-btn.facebook  { background: #1877f2; }
.social-follow-btn.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-follow-btn.pinterest { background: #e60023; }
.social-follow-btn.youtube   { background: #ff0000; }
.social-follow-btn.linkedin  { background: #0a66c2; }
.social-follow-btn.tiktok    { background: #010101; }

/* "Table of contents" widget */
.widget-toc { padding: 18px; }
.widget-toc .widget-title { margin-bottom: 10px; }
.toc-list { display: flex; flex-direction: column; gap: 4px; }
.toc-list a { font-size: 0.84rem; color: var(--text-light); padding: 4px 0; border-bottom: 1px solid var(--border); display: block; }
.toc-list a:hover { color: var(--primary); }
.toc-list a::before { content: '→ '; color: var(--primary); font-weight: 700; }

/* =========================================
   SINGLE POST
   ========================================= */
.post-header { margin-bottom: 30px; }
.post-header .post-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.post-cat-badge { font-size: 0.71rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); background: var(--primary-light); padding: 4px 12px; border-radius: 20px; }
.post-header h1 { margin-bottom: 18px; }
.post-meta { display: flex; align-items: center; gap: 16px; font-size: 0.84rem; color: var(--text-muted); flex-wrap: wrap; }
.post-meta .author { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.post-featured-image { margin-bottom: 30px; border-radius: var(--border-radius-lg); overflow: hidden; aspect-ratio: 16/7; }
.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Entry content */
.entry-content { font-size: 1.05rem; line-height: 1.82; color: var(--text); max-width: 760px; }
.entry-content h2 { font-size: 1.5rem; margin: 38px 0 14px; padding-top: 14px; border-top: 2px solid var(--border); }
.entry-content h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--text); }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content ul, .entry-content ol { margin: 12px 0 18px 22px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 7px; }
.entry-content blockquote { border-left: 4px solid var(--primary); padding: 14px 22px; background: var(--primary-light); border-radius: 0 9px 9px 0; margin: 28px 0; font-style: italic; color: var(--text-light); }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: 10px; margin: 24px auto; box-shadow: var(--shadow); }
.entry-content code { background: var(--bg); padding: 2px 7px; border-radius: 4px; font-size: 0.87em; font-family: 'Courier New', monospace; color: var(--primary); }
.entry-content pre { background: var(--secondary); color: #e0e0f0; padding: 22px; border-radius: 10px; overflow-x: auto; margin: 22px 0; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 22px 0; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--border); }
.entry-content th { background: var(--bg); font-weight: 700; }

/* Share buttons */
.post-share { display: flex; align-items: center; gap: 10px; margin: 28px 0; flex-wrap: wrap; }
.post-share-label { font-size: 0.82rem; font-weight: 700; color: var(--text-light); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 7px; font-size: 0.78rem; font-weight: 700; color: white; transition: all var(--transition); text-decoration: none; }
.share-btn:hover { transform: translateY(-2px); color: white; }
.share-btn.twitter   { background: #000; }
.share-btn.facebook  { background: #1877f2; }
.share-btn.linkedin  { background: #0a66c2; }
.share-btn.whatsapp  { background: #25d366; }
.share-btn.copy-link { background: var(--text-light); cursor: pointer; }
.share-btn.copy-link:hover { background: var(--text); }

/* Author box */
.author-box { display: flex; gap: 18px; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: var(--border-radius-lg); padding: 22px; margin: 36px 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info .author-name { font-weight: 800; font-size: 1rem; margin-bottom: 5px; }
.author-info p { font-size: 0.88rem; color: var(--text-light); margin: 0; }
@media (max-width: 480px) { .author-box { flex-direction: column; align-items: center; text-align: center; } }

/* Post navigation */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.post-nav-link { background: var(--bg-white); border-radius: var(--border-radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all var(--transition); display: flex; flex-direction: column; }
.post-nav-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-nav-link.next { text-align: right; align-items: flex-end; }
.post-nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
.post-nav-link span.post-nav-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
@media (max-width: 520px) { .post-navigation { grid-template-columns: 1fr; } }

/* Tags */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 2px solid var(--border); align-items: center; }
.post-tags > span { font-size: 0.84rem; font-weight: 600; color: var(--text-light); }

/* Key Takeaways box */
.key-takeaways { background: linear-gradient(135deg, var(--primary-light), #fff8f0); border: 2px solid var(--primary); border-radius: var(--border-radius-lg); padding: 22px 26px; margin: 28px 0; }
.key-takeaways-title { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--primary); margin-bottom: 12px; }
.key-takeaways ul { list-style: none; padding: 0; margin: 0; }
.key-takeaways li { padding: 5px 0 5px 22px; position: relative; font-size: 0.94rem; }
.key-takeaways li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 900; }

/* FAQ block */
.faq-block { margin: 30px 0; border: 1px solid var(--border); border-radius: var(--border-radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question { width: 100%; text-align: left; padding: 15px 20px; font-weight: 700; font-size: 0.95rem; color: var(--text); background: var(--bg-white); display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-family: inherit; transition: background var(--transition); }
.faq-question:hover { background: var(--bg); }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--primary); flex-shrink: 0; transition: transform var(--transition); font-weight: 400; }
.faq-question[aria-expanded="true"]::after { content: '−'; }
.faq-answer { display: none; padding: 0 20px 16px; color: var(--text-light); font-size: 0.94rem; line-height: 1.7; background: var(--bg); }
.faq-answer.open { display: block; animation: fadeSlideIn 0.2s ease; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   RELATED POSTS
   ========================================= */
.related-posts { margin-top: 48px; }
.related-posts .section-header { margin-bottom: 20px; }

/* =========================================
   COMMENTS
   ========================================= */
.comments-area { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-top: 32px; }
.comments-title { font-size: 1.2rem; margin-bottom: 22px; }
.comment { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; }
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-date { font-size: 0.77rem; color: var(--text-muted); }
.comment-text { font-size: 0.9rem; color: var(--text-light); }
.comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form-fields textarea { grid-column: 1/-1; }
.comment-form-fields input, .comment-form-fields textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.875rem; font-family: inherit; outline: none; transition: border-color var(--transition); background: var(--bg); color: var(--text); }
.comment-form-fields input:focus, .comment-form-fields textarea:focus { border-color: var(--primary); background: var(--bg-white); }
.comment-form-fields textarea { min-height: 120px; resize: vertical; }
@media (max-width: 500px) { .comment-form-fields { grid-template-columns: 1fr; } }

/* =========================================
   CALCULATORS (TOOLS PAGE)
   ========================================= */
.calc-wrap { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 28px; }
.calc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.calc-header h2 { font-size: 1.25rem; }
.calc-icon { font-size: 2.2rem; }
.calc-group { margin-bottom: 16px; }
.calc-group label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-light); margin-bottom: 6px; }
.calc-group input, .calc-group select { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-family: inherit; outline: none; transition: border-color var(--transition); background: var(--bg); color: var(--text); }
.calc-group input:focus, .calc-group select:focus { border-color: var(--primary); background: var(--bg-white); }
.calc-result { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border-radius: var(--border-radius); padding: 18px 22px; margin-top: 16px; text-align: center; display: none; }
.calc-result.show { display: block; animation: fadeSlideIn 0.25s ease; }
.calc-result-value { font-size: 2rem; font-weight: 900; line-height: 1; }
.calc-result-label { font-size: 0.85rem; opacity: 0.85; margin-top: 4px; }
@media (max-width: 600px) { .calc-wrap { padding: 20px; } }

/* =========================================
   NEWSLETTER SECTION
   ========================================= */
.newsletter-section { background: linear-gradient(135deg, var(--secondary), #16213e); color: white; padding: 60px 20px; text-align: center; margin-top: 48px; }
.newsletter-section h2 { color: white; margin-bottom: 10px; }
.newsletter-section p { color: rgba(255,255,255,.72); margin-bottom: 28px; font-size: 1rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.newsletter-inline { display: flex; gap: 10px; justify-content: center; max-width: 480px; margin: 0 auto; }
.newsletter-inline input { flex: 1; padding: 12px 18px; border-radius: 9px; border: none; font-size: 0.9rem; outline: none; font-family: inherit; }
.newsletter-inline button { padding: 12px 24px; background: var(--primary); color: white; border-radius: 9px; font-weight: 700; transition: background var(--transition); white-space: nowrap; font-family: inherit; }
.newsletter-inline button:hover { background: var(--accent2); }
@media (max-width: 520px) { .newsletter-inline { flex-direction: column; } }

/* =========================================
   PAGINATION
   ========================================= */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 44px; }
.page-numbers { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-weight: 600; font-size: 0.88rem; border: 1.5px solid var(--border); color: var(--text); transition: all var(--transition); }
.page-numbers:hover, .page-numbers.current { background: var(--primary); border-color: var(--primary); color: white; }
.page-numbers.dots { border: none; cursor: default; width: auto; }
.page-numbers.dots:hover { background: none; color: var(--text); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.65); padding: 60px 20px 22px; margin-top: 60px; }
.footer-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.footer-brand .site-title { color: white; font-size: 1.2rem; display: block; margin-bottom: 10px; }
.footer-brand p { font-size: 0.86rem; line-height: 1.72; }
.footer-social { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.social-btn { width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.9rem; font-weight: 700; transition: background var(--transition); text-decoration: none; flex-shrink: 0; }
.social-btn:hover { background: var(--primary); color: white; }
.footer-col h4 { color: white; font-size: 0.8rem; margin-bottom: 16px; letter-spacing: 0.07em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: rgba(255,255,255,.55); font-size: 0.875rem; transition: color var(--transition), padding-left var(--transition); }
.footer-col a:hover { color: white; padding-left: 4px; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.4); }
.footer-bottom-links a:hover { color: white; }
/* Footer badge */
.footer-partner-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 10px 14px; margin-top: 14px; font-size: 0.8rem; }

/* =========================================
   TOOLS GRID
   ========================================= */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 32px 0; }
.tool-card { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 26px; box-shadow: var(--shadow); transition: all var(--transition); border: 2px solid transparent; text-decoration: none; display: flex; flex-direction: column; }
.tool-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.tool-icon { font-size: 2.4rem; margin-bottom: 14px; }
.tool-card h3 { margin-bottom: 8px; font-size: 1.1rem; color: var(--text); }
.tool-card p { color: var(--text-light); font-size: 0.875rem; margin: 0; line-height: 1.6; flex: 1; }

/* =========================================
   PAGE HERO
   ========================================= */
.page-hero { background: linear-gradient(135deg, var(--secondary), #16213e); color: white; padding: 56px 20px; text-align: center; }
.page-hero h1 { color: white; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.72); max-width: 540px; margin: 0 auto; }

/* =========================================
   FEATURED STATS BAR
   ========================================= */
.stats-bar { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 14px 20px; }
.stats-bar-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stats-bar-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-light); }
.stats-bar-num { font-weight: 800; color: var(--primary); font-size: 1.05rem; }

/* =========================================
   SCROLL TO TOP
   ========================================= */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary); color: white; font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(232,64,64,.4);
  display: none; align-items: center; justify-content: center;
  transition: all var(--transition); cursor: pointer; border: none;
}
#scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
#scroll-top.visible { display: flex; }

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 4000;
  background: var(--secondary); color: rgba(255,255,255,.85); padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  transform: translateY(100%); transition: transform 0.4s ease;
}
#cookie-banner.show { transform: translateY(0); }
#cookie-banner p { font-size: 0.84rem; margin: 0; }
#cookie-banner a { color: var(--accent2); text-decoration: underline; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-accept { background: var(--primary); color: white; padding: 8px 18px; border-radius: 7px; font-weight: 700; font-size: 0.82rem; transition: background var(--transition); }
.cookie-accept:hover { background: var(--primary-dark); }
.cookie-decline { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); padding: 8px 14px; border-radius: 7px; font-size: 0.82rem; transition: background var(--transition); }
.cookie-decline:hover { background: rgba(255,255,255,.18); }

/* =========================================
   404
   ========================================= */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .error-code { font-size: 8rem; font-weight: 900; color: var(--primary); line-height: 1; opacity: 0.1; }
.error-404 h1 { margin-bottom: 14px; }
.error-404 p { color: var(--text-light); margin-bottom: 28px; max-width: 440px; margin-left: auto; margin-right: auto; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeIn 0.35s ease forwards; }

/* =========================================
   UTILITIES
   ========================================= */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-dark { background: var(--secondary); color: white; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* =========================================
   PRINT
   ========================================= */
@media print {
  .site-header, .site-footer, .sidebar, .ad-block, .ad-bar-top, .newsletter-section,
  .post-navigation, #scroll-top, #cookie-banner, .top-bar, #reading-progress { display: none !important; }
  .site-layout { grid-template-columns: 1fr !important; }
  body { background: white; color: black; font-size: 12pt; }
  a { color: black; text-decoration: underline; }
}
