/*
Theme Name: InvoiceForge Pro
Theme URI: https://invoiceforge.com
Author: InvoiceForge Team
Author URI: https://invoiceforge.com
Description: A professional WordPress theme for invoice generator tools and business document websites. Includes 20 built-in templates, invoice generator, letterpad generator, and a stunning SaaS-style design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: invoiceforge
Tags: invoice, tools, business, saas, gutenberg, responsive, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options
*/

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
  --primary: #1e6eff;
  --primary-dark: #1558cc;
  --primary-light: #4d8fff;
  --primary-pale: #eef4ff;
  --secondary: #0a1628;
  --accent: #38d9a9;
  --accent-dark: #20c997;
  --text: #1a2a3a;
  --text-muted: #5a7080;
  --text-light: #8fa0b0;
  --border: #dde8f0;
  --border-light: #eef4f8;
  --surface: #f7fbff;
  --surface-2: #edf4fb;
  --white: #ffffff;
  --shadow-sm: 0 1px 4px rgba(30,110,255,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(30,110,255,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 48px rgba(30,110,255,.14), 0 4px 16px rgba(0,0,0,.08);
  --shadow-xl: 0 24px 80px rgba(30,110,255,.18), 0 8px 24px rgba(0,0,0,.10);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', 'DM Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* =====================================================
   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(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--secondary);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }

button, input, select, textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* =====================================================
   TYPOGRAPHY UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent-dark); }
.text-small { font-size: .875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-mono { font-family: var(--font-mono); }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.01em;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(30,110,255,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,110,255,.4);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-pale);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--secondary);
  color: var(--white);
}
.btn-dark:hover {
  background: #0d1f38;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: #072b21;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(56,217,169,.35);
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: #072b21;
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 32px; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: .8125rem; border-radius: var(--radius-sm); }
.btn-xl { padding: 17px 40px; font-size: 1.125rem; border-radius: var(--radius); }

/* =====================================================
   BADGES & TAGS
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge-primary { background: var(--primary-pale); color: var(--primary); }
.badge-accent { background: rgba(56,217,169,.12); color: var(--accent-dark); }
.badge-orange { background: #fff4e6; color: #e67e00; }
.badge-purple { background: #f3eeff; color: #7c3aed; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(30,110,255,.2);
  transform: translateY(-2px);
}

/* =====================================================
   SECTION STYLES
   ===================================================== */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin-bottom: 14px;
}

.section-eyebrow::before, .section-eyebrow::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title { margin-bottom: 16px; }
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(30,110,255,.06);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(30,110,255,.3);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -.02em;
}

.logo-text span { color: var(--primary); }

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav ul li a {
  display: block;
  padding: 7px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
  color: var(--primary);
  background: var(--primary-pale);
}

.main-nav ul li.menu-item-has-children { position: relative; }

.main-nav ul li.menu-item-has-children .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.main-nav ul li.menu-item-has-children:hover .sub-menu { display: flex; }
.main-nav ul li.menu-item-has-children .sub-menu li a {
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  white-space: nowrap;
}

.header-cta { display: flex; align-items: center; gap: 10px; }

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 30%, #f5f0ff 70%, #eefaf6 100%);
  padding: 100px 0 80px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30,110,255,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56,217,169,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -.03em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -.03em;
}

.hero-stat-label {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-invoice-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px;
  border: 1px solid rgba(30,110,255,.1);
  position: relative;
}

.hero-invoice-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  right: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 0 0 4px 4px;
}

.inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.inv-card-company { font-weight: 700; color: var(--secondary); font-size: 1rem; }
.inv-card-title { font-size: 1.5rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.inv-card-num { font-size: .75rem; color: var(--text-muted); font-family: var(--font-mono); }

.inv-card-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.inv-card-table th {
  background: var(--secondary);
  color: rgba(255,255,255,.7);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 7px 10px;
  text-align: left;
}
.inv-card-table td {
  padding: 8px 10px;
  font-size: .8rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}
.inv-card-table tr:nth-child(even) td { background: var(--surface); }
.inv-card-table td:last-child { text-align: right; font-family: var(--font-mono); font-weight: 600; }

.inv-card-total {
  background: var(--secondary);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.inv-card-total-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.inv-card-total-value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--accent); }

.floating-badge {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: float 3s ease-in-out infinite;
}

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

.floating-badge-1 { top: -16px; right: -16px; color: var(--primary); animation-delay: 0s; }
.floating-badge-2 { bottom: 20px; left: -20px; color: var(--accent-dark); animation-delay: 1.5s; }

/* =====================================================
   TEMPLATE GRID SECTION
   ===================================================== */
.template-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.template-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(30,110,255,.25);
  transform: translateY(-4px);
}

.template-preview {
  background: var(--surface);
  padding: 20px;
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-preview-inner {
  background: var(--white);
  width: 100%;
  max-width: 200px;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  transform: scale(.85);
  transition: var(--transition);
}

.template-card:hover .template-preview-inner { transform: scale(.9); }

.template-preview-bar {
  height: 5px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.template-preview-line {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 5px;
}

.template-preview-line.short { width: 60%; }
.template-preview-line.med { width: 80%; }

.template-preview-table {
  margin-top: 8px;
}

.template-preview-row {
  display: flex;
  gap: 4px;
  margin-bottom: 3px;
}

.template-preview-cell {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  flex: 1;
}

.template-preview-cell.dark { background: var(--secondary); }

.template-info {
  padding: 16px;
}

.template-category {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 5px;
}

.template-name {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.template-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Color variants for template previews */
.tpl-blue .template-preview-bar { background: linear-gradient(90deg, #1e6eff, #4d8fff); }
.tpl-blue .template-preview-cell.dark { background: #1e6eff; }
.tpl-dark .template-preview-bar { background: linear-gradient(90deg, #0a1628, #1e2d4a); }
.tpl-green .template-preview-bar { background: linear-gradient(90deg, #059669, #34d399); }
.tpl-green .template-preview-cell.dark { background: #059669; }
.tpl-purple .template-preview-bar { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.tpl-purple .template-preview-cell.dark { background: #7c3aed; }
.tpl-orange .template-preview-bar { background: linear-gradient(90deg, #d97706, #fbbf24); }
.tpl-orange .template-preview-cell.dark { background: #d97706; }
.tpl-red .template-preview-bar { background: linear-gradient(90deg, #dc2626, #f87171); }
.tpl-red .template-preview-cell.dark { background: #dc2626; }
.tpl-teal .template-preview-bar { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.tpl-teal .template-preview-cell.dark { background: #0891b2; }
.tpl-minimal .template-preview-bar { background: linear-gradient(90deg, #374151, #9ca3af); }
.tpl-rose .template-preview-bar { background: linear-gradient(90deg, #e11d48, #fb7185); }
.tpl-rose .template-preview-cell.dark { background: #e11d48; }

/* =====================================================
   TOOLS SECTION
   ===================================================== */
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(30,110,255,.2);
  transform: translateY(-3px);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tool-icon-blue { background: var(--primary-pale); }
.tool-icon-green { background: rgba(56,217,169,.12); }
.tool-icon-purple { background: #f3eeff; }
.tool-icon-orange { background: #fff4e6; }

.tool-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.tool-desc {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =====================================================
   HOW IT WORKS
   ===================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 28px);
  right: calc(12.5% + 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 0;
}

.step-item { text-align: center; position: relative; z-index: 1; }

.step-number {
  width: 56px;
  height: 56px;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 6px rgba(30,110,255,.08);
  font-family: var(--font-display);
}

.step-title { font-size: 1rem; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.step-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }

/* =====================================================
   FEATURES GRID
   ===================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-color: rgba(30,110,255,.15);
}

.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature-title { font-size: .9375rem; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.feature-desc { font-size: .8125rem; color: var(--text-muted); line-height: 1.6; }

/* =====================================================
   CTA SECTION
   ===================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--secondary) 0%, #112244 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(30,110,255,.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56,217,169,.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-inner h2 { color: var(--white); margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,.65); font-size: 1.125rem; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =====================================================
   SITE FOOTER
   ===================================================== */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,.65);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-text span { color: var(--primary-light); }

.footer-tagline {
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  margin-top: 12px;
  line-height: 1.65;
  max-width: 280px;
}

.footer-heading {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.9);
  margin-bottom: 16px;
  font-family: var(--font-sans);
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: rgba(255,255,255,.9); padding-left: 4px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: .8125rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--white); }

/* =====================================================
   INVOICE GENERATOR TOOL PAGE
   ===================================================== */
.tool-page {
  background: #f5f8ff;
  min-height: calc(100vh - 64px);
  padding: 32px 0 64px;
}

.tool-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 28px;
}

.tool-page-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--secondary);
}

.tool-workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: flex-start;
}

/* =====================================================
   TEMPLATE LIBRARY PAGE
   ===================================================== */
.library-header {
  background: linear-gradient(135deg, var(--secondary) 0%, #112244 100%);
  padding: 60px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.library-header h1 { color: white; margin-bottom: 12px; }
.library-header p { color: rgba(255,255,255,.7); font-size: 1.125rem; max-width: 560px; margin: 0 auto 28px; }

.library-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 50px;
  font-size: .8125rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* =====================================================
   GUTENBERG BLOCKS
   ===================================================== */
.wp-block-invoiceforge-hero,
.wp-block-invoiceforge-template-grid,
.wp-block-invoiceforge-tool {
  margin: 0;
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.breadcrumbs {
  padding: 14px 0;
  font-size: .8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: .5; }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a, .pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pagination a { color: var(--text-muted); }
.pagination a:hover { background: var(--primary-pale); border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: white; }

/* =====================================================
   FORMS (Generic)
   ===================================================== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .9375rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  font-family: var(--font-sans);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,110,255,.12);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-info { background: var(--primary-pale); border: 1px solid rgba(30,110,255,.2); color: var(--primary-dark); }
.alert-success { background: rgba(56,217,169,.1); border: 1px solid rgba(56,217,169,.3); color: #047857; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* =====================================================
   WIDGETS (Sidebar)
   ===================================================== */
.widget { margin-bottom: 32px; }
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* =====================================================
   SINGLE TEMPLATE PAGE
   ===================================================== */
.template-page-header {
  background: var(--surface);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.template-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.template-download-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tool-workspace { grid-template-columns: 340px 1fr; }
  .hero-inner { gap: 40px; }
}

@media (max-width: 768px) {
  .section, .section-lg { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .main-nav { display: none; }
  .mobile-menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .tool-workspace { grid-template-columns: 1fr; }
  .header-cta .btn:not(.btn-primary) { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 64px 0 48px; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeInUp { animation: fadeInUp .5s ease forwards; }
.animate-fadeIn { animation: fadeIn .4s ease forwards; }

/* Stagger delays */
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
.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;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* =====================================================
   WORDPRESS SPECIFIC
   ===================================================== */
.alignnone { margin: 0.5em 1em 0.5em 0; }
.aligncenter, div.aligncenter { display: block; margin: 0.5em auto; }
.alignright { float: right; margin: 0.5em 0 0.5em 1em; }
.alignleft { float: left; margin: 0.5em 1em 0.5em 0; }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; margin: 0 auto; }
.wp-caption .wp-caption-text { font-size: .875rem; color: var(--text-muted); text-align: center; margin-top: 6px; }
.gallery { margin: 1.5em 0; }
.gallery-item { display: inline-block; padding: 4px; }
.screen-reader-text { @extend .sr-only; }
.sticky { /* WordPress sticky post */ }
.bypostauthor { /* WordPress author */ }

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-meta { font-size: .8125rem; color: var(--text-muted); margin-bottom: 8px; }
.comment-author .fn { font-weight: 700; color: var(--secondary); }

/* Post navigation */
.post-navigation { display: flex; justify-content: space-between; padding: 32px 0; border-top: 1px solid var(--border); }
