/*
Theme Name: HomePro Financial Services
Theme URI: https://homeprofunding.com
Author: HomePro Financial Services Inc
Author URI: https://homeprofunding.com
Description: A professional home improvement financing theme for HomePro Financial Services. Features blue/green branding, responsive design, and dark/light mode support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: homepro
Tags: responsive-layout, custom-menu, dark-mode, light-mode, financing, business
*/

/* ==========================================================================
   CSS Variables - Light Mode (Default)
   ========================================================================== */
:root {
  --background: hsl(210, 25%, 98%);
  --foreground: hsl(215, 30%, 15%);
  --border: hsl(210, 15%, 88%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(215, 30%, 15%);
  --card-border: hsl(210, 15%, 90%);
  --primary: hsl(215, 55%, 35%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(210, 15%, 93%);
  --secondary-foreground: hsl(215, 25%, 25%);
  --muted: hsl(210, 15%, 95%);
  --muted-foreground: hsl(215, 15%, 45%);
  --accent: hsl(145, 65%, 38%);
  --accent-foreground: hsl(0, 0%, 100%);
  --destructive: hsl(0, 72%, 51%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --input: hsl(210, 15%, 85%);
  --ring: hsl(215, 55%, 35%);
  --radius: 0.5rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   CSS Variables - Dark Mode
   ========================================================================== */
.dark {
  --background: hsl(215, 30%, 9%);
  --foreground: hsl(210, 20%, 95%);
  --border: hsl(215, 25%, 18%);
  --card: hsl(215, 30%, 12%);
  --card-foreground: hsl(210, 20%, 95%);
  --card-border: hsl(215, 25%, 18%);
  --primary: hsl(215, 60%, 45%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(215, 25%, 18%);
  --secondary-foreground: hsl(210, 20%, 90%);
  --muted: hsl(215, 25%, 15%);
  --muted-foreground: hsl(215, 15%, 55%);
  --accent: hsl(145, 65%, 42%);
  --accent-foreground: hsl(0, 0%, 100%);
  --destructive: hsl(0, 72%, 51%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --input: hsl(215, 25%, 22%);
  --ring: hsl(215, 60%, 45%);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

h1 {
  font-size: 1.875rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

@media (min-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.875rem;
  }
}

@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.75rem;
  }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 0;
  }
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-gradient {
  background: linear-gradient(135deg, hsl(215, 55%, 25%) 0%, hsl(215, 55%, 35%) 50%, hsl(145, 50%, 30%) 100%);
  position: relative;
  overflow: hidden;
  /* Match Replit spacing without relying on extra CSS overrides */
  padding: 3.5rem 0;
  min-height: 340px;
  display: block;
}

.hero-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.hero-gradient .container,
.hero-gradient .hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: left;
}

.hero-gradient-light {
  background: linear-gradient(135deg, hsl(215, 55%, 35%) 0%, hsl(145, 65%, 38%) 100%);
}

.hero-gradient-light svg {
  color: #ffffff;
  stroke: currentColor;
  fill: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  padding: 0;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 0;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-badge svg {
  color: var(--accent);
}

.hero-gradient h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
}

.hero-gradient h1 .accent,
.hero-gradient h1 span {
  color: var(--accent);
}

.hero-gradient p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 48rem;
  margin: 0 0 1.125rem 0;
}

@media (min-width: 768px) {
  .hero-gradient p {
    font-size: 1.125rem;
  }
}

/* Larger homepage hero when front page is set */
body.home .hero-gradient,
body.front-page .hero-gradient {
  padding: 3.5rem 0;
  min-height: 340px;
  display: block;
}

body.home .hero-gradient h1,
body.front-page .hero-gradient h1 {
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 0.75rem 0;
}

body.home .hero-gradient p,
body.front-page .hero-gradient p {
  font-size: 1.05rem;
  max-width: 48rem;
  margin: 0 0 1.125rem 0;
}

/* Slightly smaller hero buttons for consistency */
.hero-gradient .btn-group .btn,
.hero-gradient .btn-group a,
.hero-gradient .btn-group button {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 0.75rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.btn-accent:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--muted);
}

.btn-outline-white {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-white {
  background-color: white;
  color: var(--primary);
  border-color: white;
}

.btn-white:hover {
  opacity: 0.9;
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--muted);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .btn-group {
    flex-direction: row;
  }
  
  .btn-group .btn {
    width: auto;
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-content {
  padding: 1.5rem;
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.card-primary .card-title,
.card-primary h3 {
  color: var(--primary-foreground);
}

.card-primary p {
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Icons
   ========================================================================== */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
  flex-shrink: 0;
}

.icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.icon-box-lg {
  width: 3.5rem;
  height: 3.5rem;
}

.icon-box-lg svg {
  width: 1.75rem;
  height: 1.75rem;
}

.icon-box-primary {
  background-color: var(--primary);
}

.icon-box-primary svg {
  color: var(--primary-foreground);
}

.icon-box-accent {
  background-color: var(--accent);
}

.icon-box-accent svg {
  color: var(--accent-foreground);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

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

.form-error {
  font-size: 0.75rem;
  color: var(--destructive);
  margin-top: 0.25rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  /* Ensure translucency even when color-mix isn't supported */
  background-color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.dark .header {
  background-color: rgba(15, 23, 42, 0.88);
}

@supports (background-color: color-mix(in srgb, white 90%, transparent)) {
  .header {
    background-color: color-mix(in srgb, var(--background) 95%, transparent);
  }
  .dark .header {
    background-color: color-mix(in srgb, #0f172a 90%, transparent);
  }
}

/* Logged-in admin bar offset */
body.admin-bar .header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

@media (min-width: 640px) {
  .header-container {
    height: 5rem;
  }
}

@media (min-width: 1024px) {
  .header-container {
    height: 6rem;
  }
}

.logo img {
  height: 3.5rem;
  width: auto;
}

@media (min-width: 640px) {
  .logo img {
    height: 5rem;
  }
}

@media (min-width: 1024px) {
  .logo img {
    height: 6rem;
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: var(--muted);
}

.nav-link.active {
  background-color: var(--secondary);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* Keep keyboard focus visible in header */
.header a:focus-visible,
.header button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius);
}

@media (min-width: 1024px) {
  .nav-actions {
    display: flex;
  }
}

.mobile-nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-nav-toggle {
    display: none;
  }
}

.mobile-menu {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  transform: translateY(-0.4rem);
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  border-top: 1px solid var(--border);
  background-color: var(--background);
  padding: 0 1rem;
}

.mobile-menu.open {
  max-height: 32rem;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  padding: 1rem;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: var(--muted);
}

.mobile-nav-link.active {
  background-color: var(--secondary);
}

.mobile-nav-link svg {
  width: 1rem;
  height: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

.footer-logo img {
  height: 4rem;
  width: auto;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .footer-logo img {
    height: 5rem;
  }
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-contact-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-social svg {
  width: 1rem;
  height: 1rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

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

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

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--muted-foreground);
}

.text-white {
  color: white;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* ==========================================================================
   WP Overrides (Replit parity)
   ========================================================================== */
.header {
  background: rgba(255, 255, 255, 0.94);
}

html.dark .header,
body.dark .header {
  background: rgba(17, 24, 39, 0.92);
}

.hero-gradient h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
}

.hero-gradient h1 span {
  color: #25a857;
}

.hero-gradient p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 48rem;
  margin: 0 0 1.125rem 0;
}

body.home .hero-gradient,
body.front-page .hero-gradient {
  padding: 3.5rem 0;
  min-height: 340px;
  display: block;
}

.hero-gradient .btn-group .btn,
.hero-gradient .btn-group a,
.hero-gradient .btn-group button {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 0.75rem;
}

.calculator-result h3,
.calculator-result p,
.calculator-result span {
  color: rgba(255, 255, 255, 0.95);
}

.calculator-result svg {
  stroke: currentColor;
  fill: none;
}

.hero-gradient-light svg {
  stroke: #ffffff;
  fill: none;
  color: #ffffff;
}

input[type="range"].range-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: #e6eaf2;
  outline: none;
}

input[type="range"].range-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: #e6eaf2;
}

input[type="range"].range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1e4b9a;
  box-shadow: none;
  margin-top: -5px;
}

input[type="range"].range-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #e6eaf2;
}

input[type="range"].range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1e4b9a;
}

.header button:focus,
.header button:focus-visible,
.header a:focus,
.header a:focus-visible {
  outline: none;
  box-shadow: none;
}

.bg-muted {
  background-color: var(--muted);
}

.bg-background {
  background-color: var(--background);
}

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

.mb-3 {
  margin-bottom: 0.75rem;
}

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

.mb-6 {
  margin-bottom: 1.5rem;
}

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

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

.mt-6 {
  margin-top: 1.5rem;
}

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

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.hidden {
  display: none;
}

@media (min-width: 1024px) {
  .lg-block {
    display: block;
  }
  
  .lg-hidden {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Benefit Items
   ========================================================================== */
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.benefit-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Check List
   ========================================================================== */
.check-list {
  list-style: none;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.check-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Loan Calculator Specific Styles
   ========================================================================== */
.calculator-result {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.calculator-result h3,
.calculator-result p,
.calculator-result span,
.calculator-result svg {
  color: rgba(255, 255, 255, 0.95);
}

.calculator-result svg {
  stroke: currentColor;
  fill: none;
}

.calculator-result-value {
  font-size: 3rem;
  font-weight: 700;
  margin: 1rem 0;
}

.calculator-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.calculator-summary:last-child {
  border-bottom: none;
}

.calculator-summary-label {
  color: var(--muted-foreground);
}

.calculator-summary-value {
  font-weight: 600;
  color: var(--foreground);
}

/* Range Slider */
.range-slider {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ==========================================================================
   Steps/Timeline
   ========================================================================== */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ==========================================================================
   WordPress Specific - Forms Placeholder
   ========================================================================== */
.wp-form-placeholder {
  padding: 2rem;
  background-color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.wp-form-placeholder p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* WordPress Generated Classes */
.wp-block-button__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
}

.aligncenter {
  text-align: center;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .header,
  .footer,
  .btn,
  .mobile-nav-toggle {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero-gradient,
  .hero-gradient-light {
    background: #f0f0f0;
    color: black;
  }
}

/* ==========================================================================
   Additional UI Refinements + Mobile Optimization
   ========================================================================== */
/* Fix dollar icon (stroke-only, no filled blob) */
.calculator-result svg,
.calculator-result svg * {
  fill: none !important;
  stroke: currentColor !important;
}

/* Spacing + Rhythm (Replit parity) */
.section h2,
.section h3 {
  margin-bottom: 0.65rem !important;
}

.section p {
  margin-top: 0.35rem !important;
}

.hero-gradient h1 {
  margin-bottom: 0.85rem !important;
}

.hero-gradient p {
  margin-bottom: 1.4rem !important;
}

.section {
  padding: 3.75rem 0 !important;
}

@media (min-width: 768px) {
  .section {
    padding: 4.5rem 0 !important;
  }
}

.card .card-content {
  padding: 1.75rem !important;
}

.card .card-content h3 {
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
}

.card .card-content p {
  margin-bottom: 1rem !important;
}

.card .card-content .text-primary,
.card .card-content .font-semibold {
  margin-top: 0.25rem !important;
}

.icon-box {
  margin-bottom: 0.75rem !important;
}

.hero-gradient-light h2 {
  margin-bottom: 0.75rem !important;
}

.hero-gradient-light p {
  margin-top: 0.35rem !important;
  margin-bottom: 1.4rem !important;
}

.hero-gradient-light .btn {
  padding: 0.9rem 1.6rem !important;
}

/* Thinner, sleeker buttons (Replit-style) */
.btn,
button.btn,
a.btn,
.wp-block-button__link {
  padding: 0.6rem 1.35rem !important;
  font-size: 0.95rem !important;
  border-radius: 0.6rem !important;
  line-height: 1.2 !important;
}

.btn-lg {
  padding: 0.75rem 1.6rem !important;
  font-size: 1rem !important;
  border-radius: 0.65rem !important;
}

.btn-sm {
  padding: 0.4rem 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 0.55rem !important;
}

/* Mobile fixes */
@media (max-width: 768px) {
  .hero-gradient .container,
  .hero-gradient .hero-content {
    padding: 0 1.25rem !important;
  }

  .hero-gradient h1 {
    font-size: clamp(2rem, 9vw, 2.7rem) !important;
  }

  .hero-gradient p {
    font-size: 1rem !important;
  }

  .btn-group {
    flex-direction: column !important;
  }

  .btn-group .btn,
  .btn-group a,
  .btn-group button {
    width: 100% !important;
  }

  body.page-template-page-contact .grid,
  body.page-template-page-preapproval .grid {
    grid-template-columns: 1fr !important;
  }

  .card {
    width: 100% !important;
  }

  .wpforms-container .wpforms-field-row {
    flex-direction: column !important;
  }

  .wpforms-container .wpforms-field,
  .wpforms-container .wpforms-field-medium,
  .wpforms-container .wpforms-field-large {
    width: 100% !important;
  }
}

/* Remove sticky focus highlight on mobile nav */
.mobile-nav-link:focus,
.mobile-nav-link:focus-visible,
.mobile-nav-link:active,
.mobile-nav-toggle button:focus,
.mobile-nav-toggle button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.mobile-nav-link,
.mobile-nav-toggle button {
  -webkit-tap-highlight-color: transparent;
}

/* Normalize mobile menu button rendering across browsers */
.mobile-nav-link {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#theme-toggle-mobile {
  border-color: var(--border);
  color: var(--foreground);
  background: transparent;
}

#theme-toggle-mobile:hover,
#theme-toggle-mobile:focus-visible {
  background-color: var(--muted);
}

html.dark #theme-toggle-mobile,
body.dark #theme-toggle-mobile {
  border-color: color-mix(in srgb, var(--foreground) 14%, transparent);
  background-color: color-mix(in srgb, var(--secondary) 70%, transparent);
  color: var(--foreground);
}

#theme-toggle-mobile:active {
  transform: none;
}

/* ==========================================================================
   V6 Design System Refresh
   ========================================================================== */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-2: 0 8px 24px rgba(15, 23, 42, 0.08);
  --duration-fast: 160ms;
  --duration-med: 260ms;
  --easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
}

.section-muted {
  background-color: var(--muted);
}

.about-grid {
  align-items: center;
}

.align-start {
  align-items: start;
}

.about-stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.improvements-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.cta-shell {
  max-width: 42rem;
  margin: 0 auto;
}

.cta-lead {
  opacity: 0.82;
}

.cta-buttons-centered {
  justify-content: center;
}

.form-layout-grid {
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
}

.card-muted {
  background-color: var(--muted);
}

.card-content-lg {
  padding: var(--space-6);
}

.card-content-sm {
  padding: var(--space-4);
}

.card-primary-note {
  opacity: 0.85;
  margin-bottom: var(--space-5);
}

.icon-box-soft {
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
}

.info-panel {
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.link-underlined {
  text-decoration: underline;
}

.alert-card {
  border-width: 1px;
}

.alert-card-danger {
  border-color: color-mix(in srgb, var(--destructive) 28%, transparent);
  background-color: color-mix(in srgb, var(--destructive) 8%, transparent);
}

.alert-card-info {
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
  background-color: color-mix(in srgb, var(--primary) 8%, transparent);
}

.alert-icon-danger {
  color: var(--destructive);
}

.alert-icon-info {
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.hero-contractors {
  padding: 3.2rem 0;
}

.hero-contractors-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-6);
}

.hero-contractors-content {
  max-width: none;
}

.hero-contractors-media {
  position: relative;
  z-index: 1;
  height: clamp(20rem, 36vw, 28rem);
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, white 26%, transparent);
  box-shadow: 0 16px 44px rgba(5, 12, 28, 0.24);
}

.hero-contractors-layout .hero-contractors-media {
  isolation: isolate;
}

.hero-contractors-layout .hero-contractors-media-container {
  position: relative;
}

.hero-contractors-layout .hero-contractors-media-container::before {
  content: '';
  position: absolute;
  inset: -8% -10% -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 25%, rgba(117, 172, 255, 0.24), transparent 58%),
    radial-gradient(circle at 86% 70%, rgba(48, 198, 118, 0.2), transparent 56%);
  filter: blur(18px);
}

.hero-contractors-media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-contractors-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(7, 17, 38, 0.24), transparent 38%);
}

.hero-contractors-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 42%;
  display: block;
}

.hero-contractors-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  letter-spacing: 0.02em;
  background:
    linear-gradient(140deg, rgba(30, 75, 154, 0.34), rgba(24, 129, 78, 0.28)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
    rgba(17, 32, 66, 0.55);
}

.form-label-inline {
  margin-bottom: 0;
}

.calculator-result-note {
  opacity: 0.82;
  font-size: 0.875rem;
}

.loan-example-row {
  padding: 0.75rem;
  background-color: var(--muted);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Component polish */
.header {
  transition: background-color var(--duration-med) var(--easing-standard), box-shadow var(--duration-med) var(--easing-standard);
}

.header.is-scrolled {
  box-shadow: var(--shadow-1);
}

.nav-link {
  position: relative;
  transition: color var(--duration-fast) var(--easing-standard), background-color var(--duration-fast) var(--easing-standard);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.25rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--primary);
  transition: transform var(--duration-fast) var(--easing-standard);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.btn {
  transition: transform var(--duration-fast) var(--easing-standard), box-shadow var(--duration-fast) var(--easing-standard), background-color var(--duration-fast) var(--easing-standard), border-color var(--duration-fast) var(--easing-standard);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.card {
  box-shadow: var(--shadow-1);
  transition: transform var(--duration-med) var(--easing-standard), box-shadow var(--duration-med) var(--easing-standard), border-color var(--duration-fast) var(--easing-standard);
}

.card-hover:hover {
  box-shadow: var(--shadow-2);
}

.mobile-menu-open {
  overflow: hidden;
}

/* Subtle radiance for hero backgrounds */
.hero-gradient,
.hero-gradient-light {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-gradient::before,
.hero-gradient-light::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(44rem 32rem at 14% 18%, rgba(104, 168, 255, 0.32), transparent 68%),
    radial-gradient(42rem 30rem at 84% 22%, rgba(54, 214, 134, 0.28), transparent 70%),
    radial-gradient(36rem 26rem at 50% 92%, rgba(64, 121, 234, 0.22), transparent 68%);
  opacity: 0.56;
  mix-blend-mode: screen;
  animation: hero-radiate 14s ease-in-out infinite alternate;
}

.hero-gradient::after {
  z-index: 0;
}

@keyframes hero-radiate {
  0% {
    transform: translate3d(-1.2%, -0.8%, 0) scale(1.02);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(1.1%, 1.2%, 0) scale(1.05);
    opacity: 0.62;
  }
  100% {
    transform: translate3d(1.6%, -0.7%, 0) scale(1.03);
    opacity: 0.54;
  }
}

@media (max-width: 768px) {
  .hero-gradient::before,
  .hero-gradient-light::before {
    opacity: 0.38;
    animation-duration: 18s;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--easing-standard), transform 0.55s var(--easing-standard);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-in,
  .btn,
  .card,
  .header,
  .mobile-menu,
  .nav-link::after,
  .hero-gradient::before,
  .hero-gradient-light::before {
    transition: none;
    transform: none;
    animation: none;
  }
}

/* WPForms visual integration */
.wpforms-container .wpforms-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.wpforms-container input,
.wpforms-container select,
.wpforms-container textarea {
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  padding: 0.72rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color var(--duration-fast) var(--easing-standard), box-shadow var(--duration-fast) var(--easing-standard);
}

.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 20%, transparent);
}

.wpforms-container .wpforms-submit,
.wpforms-container button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  border-radius: 0.6rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
  font-weight: 600;
}

.external-preapproval-form {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
}

.external-preapproval-form iframe {
  display: block;
  width: 100%;
  min-height: 1250px;
  border: 0;
  background: #ffffff;
}

/* Mobile layout hardening */
@media (max-width: 1023px) {
  .form-layout-grid,
  .about-grid,
  .align-start {
    grid-template-columns: 1fr;
  }

  .about-stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-contractors-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hero-contractors {
    padding: 2.6rem 0;
  }

  .hero-contractors-media {
    width: clamp(16.5rem, 78vw, 23rem);
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.34);
    box-shadow:
      0 18px 40px rgba(6, 20, 44, 0.3),
      0 0 0 10px color-mix(in srgb, white 8%, transparent);
    margin: 0.2rem auto 0;
    order: 2;
  }

  .hero-contractors-media img {
    object-position: 48% 43%;
  }

  .hero-contractors-media::before {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  }

  .hero-contractors-media::after {
    background: radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.12), transparent 48%);
  }

  .hero-contractors-placeholder {
    font-size: 0.92rem;
    text-align: center;
    padding: 0 1rem;
  }

  .external-preapproval-form iframe {
    min-height: 1500px;
  }
}

/* Footer refresh */
.footer {
  background: color-mix(in srgb, var(--background) 88%, var(--muted));
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  padding: 1.65rem 0 0.9rem;
}

.footer-shell {
  display: grid;
  gap: 0.7rem 0.95rem;
  align-items: center;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 0.95rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 0.78rem 0.95rem;
}

.footer-inline {
  grid-template-columns: auto auto auto auto auto minmax(13rem, 1fr);
}

.footer-segment {
  min-width: 0;
}

.footer-logo img {
  height: 2.8rem;
  width: auto;
  margin: 0;
}

.footer-company-text {
  font-size: 0.76rem;
  line-height: 1.28;
  letter-spacing: 0.005em;
  color: var(--muted-foreground);
  margin: 0;
}

.footer-contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
  padding-inline: 0.15rem;
}

.footer-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  font-size: 0.78rem;
  line-height: 1.15;
  color: var(--muted-foreground);
  white-space: nowrap;
  transition: border-color var(--duration-fast) var(--easing-standard), background-color var(--duration-fast) var(--easing-standard), color var(--duration-fast) var(--easing-standard);
}

.footer-contact-chip:hover {
  color: var(--foreground);
  background: color-mix(in srgb, var(--muted) 60%, transparent);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.footer-contact-chip svg {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0;
  color: var(--primary);
  flex-shrink: 0;
}

.footer-address-chip {
  justify-self: stretch;
}

.footer-address-chip span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-bottom {
  border-top: 0;
  margin-top: 0.55rem;
  padding-top: 0.15rem;
  text-align: center;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--muted-foreground) 88%, transparent);
}

html.dark .footer-shell,
body.dark .footer-shell {
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border-color: color-mix(in srgb, var(--border) 85%, transparent);
}

html.dark .footer-contact-chip,
body.dark .footer-contact-chip {
  background: color-mix(in srgb, var(--secondary) 88%, transparent);
}

@media (max-width: 1400px) {
  .footer-inline {
    grid-template-columns: auto auto auto auto auto;
  }

  .footer-address-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 1023px) {
  .footer-shell {
    padding: 0.88rem;
  }

  .footer-inline {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .footer-company-text {
    font-size: 0.76rem;
  }

  .footer-contact-label {
    margin-top: 0.2rem;
  }

  .footer-contact-chip {
    width: fit-content;
    max-width: 100%;
  }

  .footer-address-chip {
    width: 100%;
    white-space: normal;
    align-items: flex-start;
    border-radius: var(--radius-md);
  }

  .footer-address-chip span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
  }
}
