/*
Theme Name: Calculator Theme
Theme URI: https://sayjobcity.com
Author: SayJobCity
Author URI: https://sayjobcity.com
Description: A premium, modern calculator tools WordPress theme. Fully responsive, SEO optimized, Elementor & Gutenberg compatible. Plugin-ready for calculator tool management.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sayjobcity
Tags: calculator, tools, finance, education, responsive, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =====================================================
   CSS VARIABLES & ROOT
   ===================================================== */
:root {
  --primary: #c8602a;
  --primary-dark: #b0531f;
  --primary-light: #f5e8df;
  --secondary: #2d7a4f;
  --accent-orange: #c8602a;
  --accent-purple: #8B5CF6;
  --accent-pink: #EC4899;
  --text-dark: #1a1916;
  --text-body: #2e2c28;
  --text-muted: #6b6860;
  --text-light: #a09d96;
  --border: #dddbd5;
  --border-light: #eeede9;
  --bg-white: #ffffff;
  --bg-light: #f9f9f7;
  --bg-section: #f5f5f3;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --transition: all 0.2s ease;
  --container: 1200px;
  --header-height: 70px;
}

/* Dark Mode Variables */
body.dark-mode {
  --text-dark: #f9f9f7;
  --text-body: #e8e6e0;
  --text-muted: #a09d96;
  --border: #3a3834;
  --border-light: #2a2825;
  --bg-white: #1a1916;
  --bg-light: #222019;
  --bg-section: #222019;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.35);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }
/* STICKY FIX: overflow-x:clip se horizontal scroll band rahega
   lekin position:sticky kaam karega (overflow:hidden sticky tod deta tha) */

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: clip; /* STICKY FIX: clip use karo, hidden nahi — sticky tod deta tha */
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,96,42,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.section-title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--text-dark);
  letter-spacing: -0.02em;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.view-all-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all-link:hover { gap: 8px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-finance { background: #f5e8df; color: var(--primary); }
.badge-construction { background: #FFF7ED; color: var(--accent-orange); }
.badge-health { background: #FFF1F2; color: #E11D48; }
.badge-math { background: #F5F3FF; color: var(--accent-purple); }

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* =====================================================
   HEADER / NAVBAR
   ===================================================== */
#site-header {
  position: relative;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon svg { color: #fff; }
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}
.logo-tagline {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

/* Main Nav */
#main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-link svg { width: 14px; height: 14px; transition: transform 0.2s; }
.nav-item:hover > .nav-link svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-dropdown a:hover { background: var(--bg-light); color: var(--primary); }
.nav-dropdown .dd-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  background: var(--bg-light);
  border: 1px solid var(--border);
}
.icon-btn:hover { color: var(--primary); background: var(--primary-light); border-color: var(--primary); }
.dark-mode-toggle { font-size: 13px; font-weight: 500; color: var(--text-body); padding: 0 12px; }

/* Header Search */
.header-search-wrap {
  position: relative;
}
.header-search-box {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}
.header-search-box.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header-search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-light);
  outline: none;
  transition: var(--transition);
}
.header-search-box input:focus { border-color: var(--primary); background: var(--bg-white); }

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-dark);
}
.hamburger { width: 18px; display: flex; flex-direction: column; gap: 4px; }
.hamburger span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Menu Drawer */
#mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
}
#mobile-menu.open { display: block; }
.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.mobile-menu-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: var(--bg-white);
  overflow-y: auto;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
#mobile-menu.open .mobile-menu-drawer { transform: translateX(0); }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mobile-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 18px;
}
.mobile-nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.mobile-nav-item > a:hover, .mobile-nav-item > a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.mobile-submenu { padding: 4px 0 4px 14px; display: none; }
.mobile-submenu.open { display: block; }
.mobile-submenu a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-submenu a:hover { color: var(--primary); }
.mobile-menu-footer { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 24px; }
.mobile-social { display: flex; gap: 10px; margin-top: 16px; }
.mobile-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}
.mobile-social a:hover { background: var(--primary); color: #fff; }

/* =====================================================
   HERO SECTION
   ===================================================== */
#hero {
  padding: 60px 0 50px;
  background: var(--bg-white);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-content { max-width: 540px; }
.hero-title {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero-title .highlight { color: var(--primary); }
.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* Hero Search */
.hero-search-form {
  display: flex;
  gap: 0;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.hero-search-form input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  font-size: 15px;
  color: var(--text-dark);
  background: transparent;
  outline: none;
}
.hero-search-form input::placeholder { color: var(--text-light); }
.hero-search-form button {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: var(--transition);
  cursor: pointer;
}
.hero-search-form button:hover { background: var(--primary-dark); }

/* Hero Badges */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.hero-badge .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.dot-blue { background: var(--primary-light); color: var(--primary); }
.dot-green { background: #ECFDF5; color: var(--secondary); }
.dot-orange { background: #FFF7ED; color: var(--accent-orange); }
.dot-purple { background: #F5F3FF; color: var(--accent-purple); }

/* Hero Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-calc-illustration {
  position: relative;
  width: 400px;
  height: 380px;
}
.calc-main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 210px;
  height: 290px;
  background: #1E293B;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(30,41,59,0.3);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.calc-screen {
  background: #334155;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: right;
  flex-shrink: 0;
}
.calc-screen-text { font-size: 10px; color: #94A3B8; font-family: monospace; }
.calc-screen-num { font-size: 20px; font-weight: 700; color: #F1F5F9; font-family: monospace; }
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  flex: 1;
  align-content: start;
  overflow: hidden;
}
.calc-btn {
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 600;
  color: #CBD5E1;
  background: #334155;
  height: 22px;
}
.calc-btn.blue { background: #c8602a; color: #fff; }
.calc-btn.green { background: #10B981; color: #fff; }
.calc-btn.orange { background: #F97316; color: #fff; }

/* Floating Cards */
.float-card {
  position: absolute;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 3s ease-in-out infinite;
}
.float-card:nth-child(2) { animation-delay: 0.5s; }
.float-card:nth-child(3) { animation-delay: 1s; }
.float-card:nth-child(4) { animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.fc-percent { top: 20px; left: 0; }
.fc-dollar { top: 20px; right: 0; }
.fc-chart { bottom: 20px; right: 10px; }

.fc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.fc-icon-blue { background: var(--primary-light); }
.fc-icon-green { background: #ECFDF5; }
.fc-icon-orange { background: #FFF7ED; }

.fc-label { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.fc-value { font-size: 11px; color: var(--text-muted); }

/* =====================================================
   POPULAR CATEGORIES
   ===================================================== */
#popular-categories {
  padding: 50px 0;
  background: var(--bg-white);
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}
.cat-icon-green { background: #ECFDF5; }
.cat-icon-orange { background: #FFF7ED; }
.cat-icon-red { background: #FFF1F2; }
.cat-icon-blue { background: var(--primary-light); }
.cat-icon-purple { background: #F5F3FF; }
.cat-icon-pink { background: #FDF4FF; }
.cat-icon-teal { background: #F0FDFA; }
.cat-icon-yellow { background: #FEFCE8; }
.cat-icon-indigo { background: #f5e8df; }
.cat-icon-cyan { background: #f5e8df; }

.cat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.cat-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.cat-count {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.count-green { background: #ECFDF5; color: var(--secondary); }
.count-orange { background: #FFF7ED; color: var(--accent-orange); }
.count-red { background: #FFF1F2; color: #E11D48; }
.count-blue { background: var(--primary-light); color: var(--primary); }
.count-purple { background: #F5F3FF; color: var(--accent-purple); }
.count-pink { background: #FDF4FF; color: #D946EF; }

/* =====================================================
   POPULAR CALCULATORS
   ===================================================== */
#popular-calculators {
  padding: 50px 0;
  background: var(--bg-section);
}
.calculators-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.calc-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.calc-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.calc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.calc-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.calc-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.calc-card-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.calc-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.calc-card:hover .calc-card-link { gap: 8px; }

/* =====================================================
   TRUST FEATURES
   ===================================================== */
#trust-features {
  padding: 40px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.feature-item {}
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
}
.fi-blue { background: var(--primary-light); }
.fi-red { background: #FFF1F2; }
.fi-yellow { background: #FEFCE8; }
.fi-purple { background: #F5F3FF; }
.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =====================================================
   RECENTLY ADDED
   ===================================================== */
#recently-added {
  padding: 50px 0;
  background: var(--bg-section);
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.recent-calc-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  text-decoration: none;
}
.recent-calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.recent-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.recent-info {}
.recent-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 3px;
}
.recent-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* =====================================================
   NEWSLETTER
   ===================================================== */
#newsletter-section {
  padding: 60px 0;
  background: var(--bg-white);
}
.newsletter-inner {
  background: linear-gradient(135deg, var(--primary) 0%, #b0531f 100%);
  border-radius: var(--radius-xl);
  padding: 50px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.newsletter-content .nl-icon {
  width: 54px;
  height: 54px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-bottom: 16px;
}
.newsletter-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.newsletter-content p { font-size: 14px; color: rgba(255,255,255,0.8); }
.newsletter-form-wrap { flex: 1; max-width: 400px; }
.newsletter-form {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.newsletter-form input {
  flex: 1;
  padding: 13px 18px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: #fff;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form button {
  padding: 13px 22px;
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { background: #F3F4F6; }

/* =====================================================
   FOOTER
   ===================================================== */
#site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}
.footer-main {
  padding: 50px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}
.footer-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.footer-social {
  display: flex;
  gap: 8px;
}
.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}
.social-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}
.footer-links a:hover { color: var(--primary); }

.footer-newsletter h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.footer-newsletter p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.footer-nl-form {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.footer-nl-form input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-light);
  outline: none;
}
.footer-nl-form input::placeholder { color: var(--text-light); }
.footer-nl-form button {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.footer-nl-form button:hover { background: var(--primary-dark); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copyright { font-size: 13px; color: var(--text-muted); }
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}
.footer-bottom-links a:hover { color: var(--primary); }

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb-wrap {
  padding: 14px 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); font-size: 12px; }
.breadcrumb .current { font-size: 13px; color: var(--text-dark); font-weight: 500; }

/* =====================================================
   ALL CALCULATORS PAGE
   ===================================================== */
.page-all-calcs { padding: 30px 0 60px; }
.page-all-calcs-header { margin-bottom: 24px; }
.page-all-calcs-header h1 { font-size: 28px; font-weight: 800; color: var(--text-dark); }

.calcs-search-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 20px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.calcs-search-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.calcs-search-left input {
  flex: 1;
  border: none;
  font-size: 14px;
  color: var(--text-dark);
  background: transparent;
  outline: none;
}
.calcs-search-left input::placeholder { color: var(--text-light); }
.calcs-search-divider { width: 1px; height: 40px; background: var(--border); }
.calcs-search-right { display: flex; align-items: center; gap: 16px; }
.calcs-info { display: flex; align-items: center; gap: 10px; }
.calcs-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.calcs-info-text strong { font-size: 15px; font-weight: 700; color: var(--text-dark); display: block; }
.calcs-info-text span { font-size: 12px; color: var(--text-muted); }
.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-white);
  cursor: pointer;
  outline: none;
}

.calcs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}
.calcs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.calcs-cat-list {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.calcs-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.calcs-cat-item:last-child { border-bottom: none; }
.calcs-cat-item:hover, .calcs-cat-item.active {
  background: var(--primary);
  color: #fff;
}
.calcs-cat-item.active .cci-icon { background: rgba(255,255,255,0.2); }
.calcs-cat-item.active .cci-name, .calcs-cat-item.active .cci-count { color: #fff; }
.cci-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--bg-light);
  flex-shrink: 0;
}
.cci-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dark);
}
.cci-count { font-size: 12px; color: var(--text-muted); }

.cant-find-box {
  margin-top: 12px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.cant-find-box h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.cant-find-box p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }

.calcs-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calcs-main-header h2 { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.calcs-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.tool-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.tool-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1.3;
}
.tool-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.tool-card-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.tool-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}
.tool-card:hover .tool-card-link { gap: 10px; }

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-num {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.page-num:hover, .page-num.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-num.dots { border: none; background: none; cursor: default; }
.page-num.dots:hover { background: none; color: var(--text-dark); }

/* Free to use bar */
.free-to-use-bar {
  margin-top: 32px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}
.ftu-left { display: flex; align-items: center; gap: 14px; }
.ftu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--primary);
}
.ftu-text strong { font-size: 15px; font-weight: 700; color: var(--text-dark); display: block; }
.ftu-text span { font-size: 13px; color: var(--text-muted); }

/* =====================================================
   SINGLE TOOL PAGE
   ===================================================== */
.single-tool-page { padding: 12px 0 60px; }

/* Tool area: full width at top */
.single-tool-top {
  width: 100%;
  margin-bottom: 8px;
}

/* Full-width stacked sections — no sidebar */
.single-tool-layout { display: none; } /* legacy — kept for safety */
.single-tool-main {}

/* New stacked section wrapper */
.stf-section {
  width: 100%;
  margin-bottom: 28px;
}

/* Inner content wrapper — narrows related/content/feedback to match tool width */
.stf-content-inner {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
@media (max-width: 900px) {
  .stf-content-inner { max-width: 100%; }
}
.tool-header { margin-bottom: 20px; }
.tool-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}
.tool-title { font-size: 28px; font-weight: 800; color: var(--text-dark); }
.fav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-white);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.fav-btn:hover { border-color: #E11D48; color: #E11D48; }
.tool-desc { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* Calculator Box */
.calc-box {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}
.calc-box-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}
.calc-form-col {
  padding: 28px;
  border-right: 1px solid var(--border);
}
.calc-results-col { padding: 28px; }
.calc-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* Form Fields */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-white);
  outline: none;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,96,42,0.08); }
.form-hint { font-size: 11.5px; color: var(--text-light); margin-top: 4px; }

/* Toggle Group */
.toggle-group {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.toggle-btn {
  flex: 1;
  padding: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-light);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Calc Actions */
.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.calc-actions .btn { flex: 1; justify-content: center; }
.btn-calc {
  background: var(--primary);
  color: #fff;
}
.btn-calc:hover { background: var(--primary-dark); color: #fff; }
.btn-reset {
  background: var(--bg-light);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-reset:hover { background: var(--border); }

/* Results */
.result-highlight {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-highlight-label { font-size: 13px; font-weight: 600; color: var(--secondary); margin-bottom: 6px; }
.result-highlight-value { font-size: 28px; font-weight: 800; color: #065F46; }
.result-highlight-icon {
  width: 44px;
  height: 44px;
  background: rgba(16,185,129,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--secondary);
}

.result-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.result-item:last-child { border-bottom: none; padding-bottom: 0; }
.result-item-label { font-size: 13px; color: var(--text-muted); }
.result-item-value { font-size: 15px; font-weight: 700; color: var(--text-dark); }

/* Payment Breakdown */
.payment-breakdown { margin-top: 16px; }
.pb-title { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 14px; }
.pb-chart-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.donut-chart {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}
.pb-legend { display: flex; flex-direction: column; gap: 8px; }
.pb-legend-item { display: flex; align-items: center; gap: 8px; }
.pb-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pb-dot-blue { background: var(--primary); }
.pb-dot-teal { background: #14B8A6; }
.pb-legend-label { font-size: 12px; color: var(--text-muted); }
.pb-legend-value { font-size: 12px; font-weight: 600; color: var(--text-dark); }

/* Tabs */
.tabs-wrap { margin-bottom: 24px; }
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--text-dark); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Amortization Table */
.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.amort-table th {
  padding: 10px 12px;
  background: var(--bg-section);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.amort-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}
.amort-table tbody tr:hover { background: var(--bg-light); }
.view-full-amort {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--border);
  transition: var(--transition);
}
.view-full-amort:hover { background: var(--primary-light); }

/* Tool Content */
.tool-content-section {
  margin-top: 0;
  /* Content CSS isolation — body/max-width styles bahar nahi jaayengi */
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible; /* FIX: hidden se table-wrap shadows aur sticky headers clip hote the */
}
/* Content ke andar body-jaise margin/padding reset */
.tool-content-section > *:not(style) {
  max-width: 100% !important;
  box-sizing: border-box;
}
/* Body/html scoped styles ka margin override */
.tool-content-section body,
.tool-content-section html {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tool-content-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.tool-content-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 20px 0 10px;
}
.tool-content-section p {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 14px;
}
.tool-content-section ul { margin-bottom: 14px; }
.tool-content-section ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 8px;
}
.tool-content-section ul li::before {
  /* FIX: only apply emoji bullet to theme's own generic lists, not article's custom components */
  content: "";
  display: none;
}
.numbered-steps { counter-reset: steps; margin-bottom: 14px; }
.numbered-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 10px;
  counter-increment: steps;
}
.numbered-steps li::before {
  content: counter(steps);
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.formula-box {
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 16px 0;
  text-align: center;
}
.formula-display {
  font-size: 18px;
  font-style: italic;
  color: var(--text-dark);
  font-weight: 600;
}
.formula-box.inline { text-align: left; }
.formula-box.inline .formula-display {
  font-size: 16px;
  font-family: 'Georgia', serif;
}

.cta-note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 500;
  margin: 20px 0;
}

/* Tool Sidebar */
.tool-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-box {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-box-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}
.sidebar-box-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}
.sidebar-box-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sidebar-box-body { padding: 16px 18px; }

/* Share Box */
.share-icons {
  display: flex;
  gap: 8px;
  justify-content: space-around;
}
.share-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.si-fb { background: #f5e8df; color: #1877F2; }
.si-tw { background: #f5e8df; color: #1DA1F2; }
.si-li { background: #f5e8df; color: #0A66C2; }
.si-wa { background: #ECFDF5; color: #25D366; }
.si-cp { background: var(--bg-light); color: var(--text-muted); }
.share-icon:hover { transform: scale(1.1); }

/* Formula Sidebar Box */
.formula-sb { }
.formula-sb p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}
.formula-display-box {
  background: var(--bg-section);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  color: var(--text-dark);
  font-family: 'Georgia', serif;
  margin-bottom: 12px;
}
.formula-sb .formula-vars { display: flex; flex-direction: column; gap: 6px; }
.formula-var { font-size: 12.5px; color: var(--text-muted); }
.formula-var strong { color: var(--text-dark); }

/* Links Box */
.links-list { display: flex; flex-direction: column; gap: 6px; }
.links-list a {
  font-size: 13.5px;
  color: var(--primary);
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  display: block;
}
.links-list a:last-child { border-bottom: none; }
.links-list a:hover { color: var(--primary-dark); padding-left: 4px; }

/* =====================================================
   BLOG PAGE
   ===================================================== */
.blog-page { padding: 30px 0 60px; }
.blog-page-header { margin-bottom: 24px; }
.blog-page-header h1 { font-size: 32px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.blog-page-header p { font-size: 15px; color: var(--text-muted); }
.blog-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.blog-search-form {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-white);
}
.blog-search-form input {
  padding: 10px 14px;
  border: none;
  font-size: 14px;
  color: var(--text-dark);
  background: transparent;
  outline: none;
  width: 240px;
}
.blog-search-form button {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.blog-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 24px;
  align-items: start;
}

/* Blog Sidebar Left */
.blog-sidebar-left {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bs-box {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bs-box-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.bs-box-header h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.bs-box-body { padding: 10px; }
.bs-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.bs-cat-item:hover, .bs-cat-item.active { background: var(--primary-light); }
.bs-cat-item.active .bs-cat-name { color: var(--primary); font-weight: 600; }
.bs-cat-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.bs-cat-name { flex: 1; font-size: 13.5px; color: var(--text-dark); }
.bs-cat-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-section);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.blog-nl-form {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-nl-form p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.blog-nl-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-light);
  outline: none;
  transition: var(--transition);
}
.blog-nl-form input:focus { border-color: var(--primary); background: var(--bg-white); }

/* Blog Content */
.blog-main {}

.featured-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}
.featured-post {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 20px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  text-decoration: none;
  transition: var(--transition);
}
.featured-post:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.featured-post-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 200px;
  background: var(--bg-section);
  flex-shrink: 0;
}
.featured-post-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-post-img.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.featured-post-content { padding: 4px 0; }
.featured-post-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.featured-post-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.35;
}
.featured-post-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.read-more-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.latest-posts-title { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; }
.post-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: var(--transition);
}
.post-card:last-child { border-bottom: none; }
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 80px;
  background: var(--bg-section);
  flex-shrink: 0;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-img.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.post-card-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 6px;
}
.post-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 6px;
  transition: var(--transition);
}
.post-card-excerpt {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Blog Sidebar Right */
.blog-sidebar-right {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.popular-post-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}
.popular-post-item:last-child { border-bottom: none; }
.pp-img {
  width: 64px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
  flex-shrink: 0;
}
.pp-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-img.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.pp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: var(--transition);
}
.popular-post-item:hover .pp-title { color: var(--primary); }
.pp-date { font-size: 11.5px; color: var(--text-muted); }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; }
.tag-pill {
  padding: 5px 12px;
  background: var(--bg-section);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
  border: 1.5px solid var(--border);
}
.tag-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.view-all-tags {
  padding: 10px 16px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =====================================================
   SEARCH PAGE
   ===================================================== */
.search-page { padding: 40px 0 60px; }
.search-page h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.search-info { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results h3 { font-size: 20px; color: var(--text-dark); margin-bottom: 8px; }
.no-results p { color: var(--text-muted); }

/* =====================================================
   SINGLE BLOG POST
   ===================================================== */
.single-post-page { padding: 30px 0 60px; }
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
}
.post-article {}
.post-feat-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
  height: 380px;
  background: var(--bg-section);
}
.post-feat-img img { width: 100%; height: 100%; object-fit: cover; }
.post-article-title { font-size: 28px; font-weight: 800; color: var(--text-dark); margin-bottom: 14px; line-height: 1.3; }
.post-article-meta { margin-bottom: 20px; }
.post-article-body h2 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; }
.post-article-body h3 { font-size: 17px; font-weight: 700; margin: 20px 0 10px; }
.post-article-body p { font-size: 15px; line-height: 1.8; color: var(--text-body); margin-bottom: 14px; }
.post-article-body ul, .post-article-body ol { padding-left: 24px; margin-bottom: 14px; }
.post-article-body li { font-size: 15px; line-height: 1.7; color: var(--text-body); margin-bottom: 6px; }
.post-article-body ul { list-style: disc; }
.post-article-body ol { list-style: decimal; }

/* =====================================================
   ARCHIVE / CATEGORY PAGE
   ===================================================== */
.archive-page { padding: 30px 0 60px; }
.archive-header { margin-bottom: 28px; }
.archive-header h1 { font-size: 26px; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; }
.archive-header p { font-size: 14px; color: var(--text-muted); }
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
}

/* =====================================================
   RESPONSIVE - TABLET
   ===================================================== */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .calculators-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .calcs-layout { grid-template-columns: 200px 1fr; }
  .calcs-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .single-tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { position: static; }
  .single-tool-top { margin-bottom: 8px; }
  .blog-sidebar-right { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-title { font-size: 36px; }
  .calc-box-inner { grid-template-columns: 1fr; }
  .calc-form-col { border-right: none; border-bottom: 1px solid var(--border); }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form-wrap { max-width: 100%; width: 100%; }
  .single-post-layout { grid-template-columns: 1fr; }
  .archive-layout { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-img { height: 220px; }
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 768px) {
  :root { --header-height: 60px; }
  
  #main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .dark-mode-toggle { display: none; }
  
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 14px; }
  #hero { padding: 36px 0 32px; }
  
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card { padding: 18px 12px; }
  .cat-icon { width: 42px; height: 42px; font-size: 20px; }
  .cat-desc { display: none; }
  
  .calculators-grid { grid-template-columns: 1fr; }
  .calcs-grid-3 { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: repeat(2, 1fr); }
  
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  
  .calcs-layout { grid-template-columns: 1fr; }
  .calcs-sidebar { position: static; }
  .calcs-cat-list { display: flex; overflow-x: auto; }
  .calcs-cat-item { flex-shrink: 0; border-bottom: none; border-right: 1px solid var(--border-light); }
  
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar-left { position: static; }
  
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
  
  .newsletter-inner { padding: 30px 24px; }
  .newsletter-inner h2 { font-size: 20px; }
  
  .tool-title { font-size: 22px; }
  .tool-title-row { flex-direction: column; gap: 12px; }
  
  .calcs-search-bar { flex-direction: column; align-items: stretch; }
  .calcs-search-divider { display: none; }
  .calcs-search-right { justify-content: space-between; }
  
  .section-title { font-size: 18px; }
  
  .header-search-wrap { display: none; }
  
  .single-tool-layout { grid-template-columns: 1fr; }
  
  .result-highlight-value { font-size: 22px; }
  
  .blog-header-row { flex-direction: column; align-items: flex-start; }
  
  .free-to-use-bar { flex-direction: column; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .hero-badges { flex-direction: column; gap: 8px; }
  .hero-search-form { flex-direction: column; border-radius: var(--radius-md); }
  .hero-search-form button { border-radius: var(--radius-md); }
}

/* =====================================================
   WORDPRESS NATIVE ELEMENTS
   ===================================================== */
.wp-block-image img { border-radius: var(--radius-md); }
.wp-block-quote {
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  background: var(--primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}
.wp-block-quote p { color: var(--primary-dark); font-style: italic; }
.wp-block-separator { border-color: var(--border); }
.wp-block-code {
  background: var(--bg-section);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
}
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin: 0 auto 16px; }

/* Screen reader text */
.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;
}

/* =====================================================
   SKIP LINK
   ===================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999999;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* =====================================================
   LOADING STATES
   ===================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
  #site-header, #site-footer, .tool-sidebar, .blog-sidebar-left, .blog-sidebar-right { display: none; }
  .single-tool-layout { display: block; }
  body { font-size: 12pt; color: #000; }
}

/* =====================================================
   REFINEMENTS v1.1 — Mobile & Layout Improvements
   ===================================================== */

/* ── Header: better mobile spacing ── */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 4px;
    gap: 0;
    justify-content: space-between;
  }
  .site-logo { gap: 8px; }
  .logo-name  { font-size: 16px; }
  .logo-tagline { display: none; }
  .header-actions { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  /* give breathing room between logo and hamburger */
  .mobile-menu-btn { margin-left: 8px; }
}

/* ── Hero: show illustration on mobile ── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  /* show visual on tablet & mobile, but smaller */
  .hero-visual {
    display: flex !important;
    justify-content: center;
  }
  .hero-calc-illustration {
    width: 260px;
    height: 220px;
    transform: scale(0.72);
    transform-origin: center top;
  }
}

@media (max-width: 768px) {
  /* Hero layout: content first, then illustration */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-visual {
    display: flex !important;
    order: 2;
  }
  .hero-content { order: 1; }
  .hero-calc-illustration {
    width: 220px;
    height: 180px;
    transform: scale(0.65);
    transform-origin: center top;
  }
  /* Reduce float cards clutter on small screens */
  .float-card { padding: 8px 12px; }
  .fc-label  { font-size: 11px; }
  .fc-value  { font-size: 10px; }
  .fc-icon   { width: 28px; height: 28px; font-size: 14px; }

  #hero { padding: 28px 0 24px; }
  .hero-title { font-size: 26px; letter-spacing: -0.5px; line-height: 1.2; }
  .hero-desc  { font-size: 13.5px; margin-bottom: 20px; }

  /* Search bar stays full-width and inline */
  .hero-search-form {
    flex-direction: row !important;
    border-radius: var(--radius-lg) !important;
  }
  .hero-search-form input  { padding: 12px 14px; font-size: 14px; }
  .hero-search-form button {
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0 !important;
    white-space: nowrap;
  }

  /* Trust badges: 2×2 grid instead of vertical list */
  .hero-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
  }
  .hero-badge { font-size: 12px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px; }
  .hero-search-form { flex-direction: row !important; }
  .hero-search-form button { padding: 12px 14px; font-size: 13px; }
}

/* ── Newsletter: never hide the button on mobile ── */
@media (max-width: 768px) {
  .newsletter-inner {
    flex-direction: column;
    padding: 28px 20px;
    gap: 20px;
    text-align: center;
    border-radius: var(--radius-xl);
  }
  .newsletter-content .nl-icon { margin: 0 auto 12px; }
  .newsletter-content h2 { font-size: 19px; }
  .newsletter-form-wrap { width: 100%; max-width: 100%; }
  /* force input+button to stay side-by-side */
  .newsletter-form {
    flex-direction: row !important;
    border-radius: var(--radius-md);
  }
  .newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 13px;
  }
  .newsletter-form button {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }
}

/* ── Footer: mobile layout — 2-col links, then newsletter ── */
@media (max-width: 768px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  /* Brand spans full width at top */
  .footer-brand {
    grid-column: 1 / -1;
  }
  /* Quick Links col 1, Categories col 2 */
  .footer-col:nth-of-type(1) { grid-column: 1; }
  .footer-col:nth-of-type(2) { grid-column: 2; }
  /* Newsletter spans full width at bottom */
  .footer-newsletter {
    grid-column: 1 / -1;
  }
  /* Footer newsletter form stays row on mobile */
  .footer-nl-form {
    flex-direction: row !important;
  }
  .footer-nl-form input  { flex: 1; min-width: 0; }
  .footer-nl-form button { flex-shrink: 0; white-space: nowrap; }

  .footer-desc { font-size: 13px; margin-bottom: 14px; }
  .footer-col h4 { margin-bottom: 12px; }
  .footer-links { gap: 8px; }
  .footer-links a { font-size: 13px; }
  .footer-main { padding: 36px 0 28px; }
}

@media (max-width: 480px) {
  /* On very small phones keep 2-col links but tighten */
  .footer-grid { gap: 22px 12px; }
  .footer-social { flex-wrap: wrap; }
}

/* ── Single Tool Page: full mobile responsiveness ── */
@media (max-width: 768px) {
  .single-tool-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .single-tool-top { margin-bottom: 8px; }
  .tool-sidebar { position: static !important; }

  /* Calculator box: stack form + results */
  .calc-box-inner {
    grid-template-columns: 1fr !important;
  }
  .calc-form-col {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    padding: 20px 16px;
  }
  .calc-results-col { padding: 20px 16px; }

  /* Inputs full width, comfortable touch targets */
  .form-input { padding: 12px 14px; font-size: 15px; }
  .toggle-btn { padding: 10px; font-size: 14px; }
  .calc-actions { flex-direction: column; gap: 8px; }
  .calc-actions .btn { width: 100%; justify-content: center; }

  /* Result highlight */
  .result-highlight { padding: 16px; }
  .result-highlight-value { font-size: 24px; }

  /* Donut chart area */
  .pb-chart-wrap { flex-direction: column; align-items: center; gap: 14px; }
  .donut-chart { width: 120px; height: 120px; }
  .pb-legend { width: 100%; }

  /* Tabs */
  .tabs-nav { overflow-x: auto; gap: 0; }
  .tab-btn  { white-space: nowrap; padding: 10px 14px; font-size: 13px; }

  /* Amortization table */
  .amort-table { font-size: 12px; }
  .amort-table th, .amort-table td { padding: 8px 6px; }

  /* Tool content */
  .tool-content-section h2 { font-size: 18px; }
  .tool-content-section h3 { font-size: 15px; }
  .tool-content-section p  { font-size: 14px; }
  .formula-display { font-size: 15px; }
  .formula-display-box { font-size: 14px; padding: 12px; }

  /* Sidebar boxes stack cleanly */
  .sidebar-box { margin-bottom: 0; }
  .share-icons { gap: 6px; }
  .share-icon  { width: 40px; height: 40px; }

  /* New sb-card sidebar mobile */
  .tool-sidebar { gap: 12px; }
  .sb-share-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .sb-share-btn { padding: 7px 8px; font-size: 12px; }
  .sb-card-head { padding: 12px 14px; }
  .sb-card-body { padding: 12px 14px; }
  .sb-card-body--links { padding: 6px 0; }
  .sb-link-item { padding: 8px 14px; font-size: 12.5px; }
  .sb-link-arrow { opacity: 1; }
}

/* ── All Calculators Page: mobile ── */
@media (max-width: 768px) {
  .calcs-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* Horizontal scroll pill-list for categories */
  .calcs-sidebar { position: static !important; }
  .calcs-cat-list {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0;
    border-radius: var(--radius-lg);
    padding-bottom: 2px;
  }
  .calcs-cat-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    border-bottom: none;
    border-right: 1px solid var(--border-light);
    padding: 10px 14px;
    min-width: 120px;
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
  .cci-count { font-size: 11px; }
  .cant-find-box { margin-top: 0; }

  /* Tool grid single column */
  .calcs-grid-3 { grid-template-columns: 1fr; }
  .tool-card { padding: 16px; }
  .tool-card-icon { width: 40px; height: 40px; font-size: 18px; }
  .tool-card-name { font-size: 14px; }
  .tool-card-desc { font-size: 12px; }

  /* Search bar stacks */
  .calcs-search-bar {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  .calcs-search-left  { flex-direction: row; }
  .calcs-search-right { flex-direction: row; justify-content: space-between; align-items: center; }
  .calcs-search-divider { display: none; }

  /* Pagination */
  .page-num { width: 32px; height: 32px; font-size: 12px; }
}

/* ── Blog Page: distinct layout improvements ── */
@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; gap: 20px; }
  .blog-sidebar-left  { position: static !important; display: none; } /* collapsed on mobile, shown via tab */
  .blog-sidebar-right { display: none; }

  /* Mobile blog tabs to replace sidebars */
  .blog-mobile-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
  }
  .blog-mobile-tab {
    flex: 1;
    padding: 11px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    transition: var(--transition);
  }
  .blog-mobile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

  .blog-sidebar-mobile { display: block; }
  .blog-sidebar-mobile.hidden { display: none; }

  /* Featured post stacks */
  .featured-post { grid-template-columns: 1fr; padding: 14px; }
  .featured-post-img { height: 180px; }
  .featured-post-title { font-size: 17px; }
  .featured-post-excerpt { font-size: 13px; }

  /* Post card list */
  .post-card { grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; }
  .post-card-img { height: 70px; }
  .post-card-title { font-size: 13.5px; }

  /* Blog search */
  .blog-header-row { flex-direction: column; gap: 14px; align-items: stretch; }
  .blog-search-form { width: 100%; }
  .blog-search-form input { width: 100%; }

  /* Pagination mobile */
  .pagination { gap: 4px; }
}

/* ── Recent grid on mobile ── */
@media (max-width: 480px) {
  .recent-grid { grid-template-columns: 1fr; }
  .recent-calc-card { padding: 12px 14px; }
}

/* ── Category cards mobile: always 2 cols ── */
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-card { padding: 16px 10px; }
  .cat-icon { width: 38px; height: 38px; margin-bottom: 8px; }
  .cat-name { font-size: 13px; }
  .cat-count { font-size: 11px; padding: 3px 8px; }
}

/* ── Trust features: always 2×2 grid ── */
@media (max-width: 768px) {
  #trust-features { padding: 28px 0; }
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .feature-icon { width: 44px; height: 44px; font-size: 18px; }
  .feature-title { font-size: 13.5px; }
  .feature-desc  { font-size: 12px; }
}

/* ── Section header on mobile ── */
@media (max-width: 480px) {
  .section-header { flex-wrap: wrap; gap: 8px; }
  .section-title  { font-size: 17px; }
  .view-all-link  { font-size: 13px; }
}

/* ── Popular calculators: 1 col on mobile ── */
@media (max-width: 640px) {
  .calculators-grid { grid-template-columns: 1fr; }
  .calc-card { padding: 16px; }
  .calc-card-icon { width: 40px; height: 40px; font-size: 18px; }
  .calc-card-title { font-size: 14px; }
}

/* ── Breadcrumb on mobile ── */
@media (max-width: 480px) {
  .breadcrumb { gap: 4px; }
  .breadcrumb a, .breadcrumb .current, .breadcrumb .sep { font-size: 12px; }
}

/* ── Free to use bar on mobile ── */
@media (max-width: 640px) {
  .free-to-use-bar { flex-direction: column; gap: 14px; text-align: center; padding: 16px; }
  .ftu-left { justify-content: center; }
}

/* ── Blog page distinct styling ── */
.blog-page-wrap { background: var(--bg-white); }
.blog-hero-banner {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fdebd8 100%);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 28px;
  margin-bottom: 0;
}
.blog-hero-banner h1 { font-size: 30px; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; }
.blog-hero-banner p  { font-size: 15px; color: var(--text-muted); max-width: 500px; }

/* Featured post elevated card */
.featured-post {
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.2s ease;
}
.featured-post:hover { box-shadow: var(--shadow-xl); }

/* Blog categories sidebar pill-style */
.bs-cat-item.active .bs-cat-name { color: var(--primary); font-weight: 700; }
.bs-cat-item.active .bs-cat-icon { background: var(--primary-light); }
.bs-cat-item.active { background: var(--primary-light); border-radius: var(--radius-sm); }

/* ── Single post mobile ── */
@media (max-width: 768px) {
  .single-post-layout { grid-template-columns: 1fr; }
  .post-feat-img { height: 220px; border-radius: var(--radius-lg); }
  .post-article-title { font-size: 22px; }
  .post-article-body h2 { font-size: 18px; }
  .post-article-body p  { font-size: 14px; }
}


/* ── Dark mode improvements ── */
body.dark-mode .newsletter-inner { background: linear-gradient(135deg, #b0531f 0%, #9a4619 100%); }
body.dark-mode .hero-search-form { border-color: var(--border); }
body.dark-mode .calc-main { box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
body.dark-mode .float-card { background: #1F2937; border: 1px solid var(--border); }
body.dark-mode .sidebar-box { background: #1F2937; }
body.dark-mode .bs-box { background: #1F2937; }
body.dark-mode .calc-box { background: #1F2937; }
body.dark-mode .form-input { background: #111827; color: var(--text-dark); border-color: var(--border); }
body.dark-mode .toggle-btn { background: #374151; color: var(--text-muted); }
body.dark-mode .toggle-btn.active { background: var(--primary); color: #fff; }
body.dark-mode .result-highlight { background: linear-gradient(135deg, #064E3B 0%, #065F46 100%); }
body.dark-mode .amort-table th { background: #1F2937; }
body.dark-mode .tag-pill { background: #1F2937; border-color: var(--border); }
body.dark-mode .category-card { background: #1F2937; }
body.dark-mode .calc-card, body.dark-mode .tool-card { background: #1F2937; }
body.dark-mode .recent-calc-card { background: #1F2937; }
body.dark-mode .free-to-use-bar { background: #1F2937; }
body.dark-mode .featured-post { background: #1F2937; }
body.dark-mode .post-card:hover .post-card-title { color: var(--primary); }
body.dark-mode #site-header { border-bottom-color: var(--border); }
body.dark-mode #trust-features { border-color: var(--border); }
body.dark-mode .cant-find-box { background: #1F2937; }

/* ── Smooth transitions for dark mode ── */
body, #site-header, .calc-card, .tool-card, .category-card,
.sidebar-box, .bs-box, .calc-box, .form-input, .recent-calc-card,
.featured-post, .post-card, .free-to-use-bar, .tag-pill {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ── URL-clean single tool: no /tool/ prefix in breadcrumb display ── */
.breadcrumb .tool-slug-hidden { display: none; }

/* ── Improved card hover states ── */
.calc-card:hover   { transform: translateY(-3px); }
.tool-card:hover   { transform: translateY(-3px); }
.category-card:hover { transform: translateY(-4px); }
.recent-calc-card:hover { transform: translateY(-2px); }

/* ── Hero search focus ring ── */
.hero-search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,96,42,0.12);
}

/* ── Tablet: show hero visual nicely ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 340px; }
  .hero-visual { display: flex !important; }
  .hero-title  { font-size: 34px; }
}

/* ── Fix newsletter on very small screens ── */
@media (max-width: 380px) {
  .newsletter-form button { padding: 12px 12px; font-size: 12px; }
  .newsletter-form input  { font-size: 12px; padding: 12px 10px; }
  .newsletter-inner { padding: 22px 14px; }
}

/* ── Footer bottom on mobile ── */
@media (max-width: 480px) {
  .footer-bottom-inner { flex-direction: column; gap: 10px; align-items: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-bottom-links a { font-size: 12px; }
  .footer-copyright { font-size: 12px; text-align: center; }
}

/* ── Improved spacing for recently added on mobile ── */
@media (max-width: 768px) {
  #recently-added { padding: 32px 0; }
  .recent-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .recent-name { font-size: 12.5px; }
  .recent-time { font-size: 11px; }
  .recent-icon { width: 34px; height: 34px; font-size: 16px; }
}

/* ── Improved popular categories mobile ── */
@media (max-width: 768px) {
  #popular-categories { padding: 32px 0; }
  #popular-calculators { padding: 32px 0; }
}


/* ── Footer explicit order for mobile 2-col layout ── */
@media (max-width: 768px) {
  .footer-brand         { order: 1; grid-column: 1 / -1; }
  .footer-col:nth-of-type(1) { order: 2; grid-column: 1; }   /* Quick Links */
  .footer-col:nth-of-type(2) { order: 3; grid-column: 2; }   /* Categories  */
  .footer-newsletter    { order: 4; grid-column: 1 / -1; }   /* Newsletter  */

  /* Force display grid on footer for reliable ordering */
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
}

/* ── Hero visual: show on all screen sizes ── */
.hero-visual {
  display: flex !important;  /* Override any display:none */
}

/* ── On phones: hero stacks content THEN illustration ── */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: left;
  }
  .hero-content { order: 1; }
  .hero-visual  { order: 2; justify-content: center; }
  .hero-calc-illustration {
    width: 200px;
    height: 160px;
    transform: scale(0.6);
    transform-origin: top center;
    margin: 0 auto;
  }
  /* Hide secondary float cards on tiny screens */
  .fc-chart { display: none; }
  .fc-dollar { display: none; }
}

/* ── Blog hero banner show on mobile too ── */
@media (max-width: 768px) {
  .blog-hero-banner { padding: 24px 0 18px; }
  .blog-hero-banner h1 { font-size: 24px; }
  .blog-hero-banner p  { font-size: 13.5px; }
}

/* ================================================================
   SAYJOBCITY – SIDEBAR REDESIGN (v7)
   ================================================================ */

/* Card wrapper */
.sb-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.sb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* Card header */
.sb-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--border);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.sb-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-icon-share   { background: #f5e8df; color: #c8602a; }
.sb-icon-formula { background: #F5F3FF; color: #7C3AED; }
.sb-icon-links   { background: #ECFDF5; color: #059669; }
.sb-icon-related { background: #FFF7ED; color: #EA580C; }

.sb-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0;
}
.sb-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* Card body */
.sb-card-body { padding: 14px 16px; }
.sb-card-body--links { padding: 8px 0; }

/* Share grid */
.sb-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.sb-share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .18s;
  border: 1.5px solid transparent;
}
.sb-share-btn span { white-space: nowrap; }
.sb-share-fb { background: #f5e8df; color: #1877F2; border-color: #f0c9a8; }
.sb-share-tw { background: #f5e8df; color: #1DA1F2; border-color: #f0c9a8; }
.sb-share-wa { background: #ECFDF5; color: #16A34A; border-color: #BBF7D0; }
.sb-share-li { background: #f5e8df; color: #0A66C2; border-color: #f0c9a8; }
.sb-share-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.1); }

.sb-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  border: 1.5px dashed var(--border);
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.sb-copy-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Formula box */
.sb-formula-intro {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.sb-formula-box {
  background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
  border: 1.5px solid #DDD6FE;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  margin-bottom: 12px;
}
.sb-formula-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7C3AED;
  margin-bottom: 6px;
}
.sb-formula-text {
  font-size: 14.5px;
  font-style: italic;
  font-weight: 700;
  color: #4C1D95;
  font-family: 'Georgia', serif;
  line-height: 1.5;
}
.sb-formula-vars { display: flex; flex-direction: column; gap: 5px; }
.sb-formula-var {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.sb-var-dot {
  width: 5px;
  height: 5px;
  background: #7C3AED;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Link items */
.sb-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: all .15s;
  border-bottom: 1px solid var(--border-light, #F1F5F9);
}
.sb-link-item:last-child { border-bottom: none; }
.sb-link-item:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-left: 20px;
}
.sb-link-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}
.sb-link-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.sb-link-arrow {
  margin-left: auto;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity .15s, transform .15s;
  flex-shrink: 0;
}
.sb-link-item:hover .sb-link-arrow { opacity: 1; transform: translateX(2px); }

/* ================================================================
   RELATED TOOLS SECTION (below content)
   ================================================================ */

.related-tools-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}
.related-tools-header {
  margin-bottom: 20px;
}
.related-tools-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}
.related-tools-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}
.related-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.related-tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.related-tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb, 200,96,42),.12);
  transform: translateY(-2px);
}
.related-tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.related-tool-info { flex: 1; min-width: 0; }
.related-tool-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.related-tool-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-tool-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.related-tool-card:hover .related-tool-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--primary);
}

/* ── Content Section Improvements ── */
.tool-content-section {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  margin-top: 28px;
}

/* Dark mode */
body.dark-mode .sb-card { background: #1F2937; border-color: #374151; }
body.dark-mode .sb-card-head { background: linear-gradient(135deg,#1f2937,#111827); }
body.dark-mode .sb-share-fb { background: #3d1a0a; border-color: #c8602a; }
body.dark-mode .sb-share-tw { background: #3d1a0a; border-color: #d4703a; }
body.dark-mode .sb-share-wa { background: #052e16; border-color: #16A34A; }
body.dark-mode .sb-share-li { background: #3d1a0a; border-color: #c8602a; }
body.dark-mode .sb-copy-btn { background: #374151; border-color: #4B5563; color: #9CA3AF; }
body.dark-mode .sb-formula-box { background: linear-gradient(135deg,#2D1B69,#1E1B4B); border-color: #4C1D95; }
body.dark-mode .sb-formula-text { color: #C4B5FD; }
body.dark-mode .sb-formula-label { color: #A78BFA; }
body.dark-mode .related-tool-card { background: #1F2937; border-color: #374151; }
body.dark-mode .related-tool-name { color: #F9FAFB; }
body.dark-mode .tool-content-section { background: #1F2937; border-color: #374151; }

/* Responsive */
@media (max-width: 768px) {
  .related-tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .related-tool-card {
    padding: 12px 14px;
  }
  .related-tool-arrow { opacity: 1; }
}
@media (max-width: 640px) {
  .sb-share-grid { grid-template-columns: 1fr 1fr; }
  .tool-content-section { padding: 20px 18px; }
  .related-tools-title { font-size: 17px; }
  .related-tool-name { font-size: 13px; }
  .related-tool-icon { width: 36px; height: 36px; font-size: 16px; }
}
