/* ========================================
   BreakEven SMB - Break-Even Calculator
   Stylesheet
   
   Hand-coded with care by Dagemawi Alemayehu
   ======================================== */

/* CSS Variables */
:root {
    --primary-blue: #0A74DA;
    --secondary-teal: #00BFA5;
    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #666666;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;
    --warning-bg: #FEF3C7;
    --warning-text: #92400E;
    --warning-border: #F59E0B;
    --success-bg: #D1FAE5;
    --success-text: #065F46;
    --error-bg: #FEE2E2;
    --error-text: #991B1B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Improve text rendering on mobile */
@media (max-width: 639px) {
    html {
        text-size-adjust: 100%;
        -webkit-text-size-adjust: 100%;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* Container - Fluid and responsive */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

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

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

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

/* Responsive Typography */
@media (max-width: 639px) {
    html {
        font-size: 15px;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .form-group input,
    .form-group-v2 input,
    .form-group-v2 select,
    .lead-form input,
    .lead-form select,
    button,
    .cta-btn,
    .tool-btn {
        min-height: 48px;
    }
}

/* ========================================
   Header V2 - Modern Design
   ======================================== */
.header-v2 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-v2-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}

/* Logo */
.header-v2-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.header-v2-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-v2-logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

.header-v2-logo-text {
    display: flex;
    flex-direction: column;
}

.header-v2-logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.header-v2-logo-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
}

/* Navigation */
.header-v2-nav {
    display: none;
}

.header-v2-nav-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.header-v2-nav-list a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.header-v2-nav-list a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.header-v2-nav-list a.active {
    color: white;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* CTA Button */
.header-v2-cta {
    display: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.header-v2-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Toggle */
.header-v2-mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-shrink: 0;
}

.header-v2-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Navigation */
.header-v2-mobile-nav {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.header-v2-mobile-nav.active {
    max-height: 400px;
    padding: 0.75rem 0;
}

.header-v2-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-v2-mobile-list a {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.header-v2-mobile-list a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.header-v2-mobile-list a.active {
    color: white;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Responsive */
@media (min-width: 768px) {
    .header-v2-nav {
        display: block;
    }
    
    .header-v2-mobile-toggle {
        display: none;
    }
    
    .header-v2-mobile-nav {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .header-v2-cta {
        display: inline-block;
    }
    
    .header-v2-nav-list a {
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   Legacy Header & Navigation (Deprecated)
   ======================================== */
.main-nav {
    display: none;
}

.header {
    display: none;
}

/* ========================================
   Main & Hero
   ======================================== */
.main {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 0.9375rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 375px) {
    .hero-title {
        font-size: 1.625rem;
    }
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

/* ========================================
   Cards
   ======================================== */
.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 375px) {
    .card {
        padding: 1.125rem;
    }
}

@media (min-width: 480px) {
    .card {
        padding: 1.25rem;
    }
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

@media (min-width: 375px) {
    .card-title {
        font-size: 1.1875rem;
    }
}

@media (min-width: 640px) {
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

.card-subtitle {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
    margin-top: -0.75rem;
}

/* ========================================
   Calculator Section
   ======================================== */
.calculator-section {
    margin-bottom: 1.5rem;
}

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

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

/* Input Card */
.input-card {
    height: fit-content;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .input-form {
        gap: 1.25rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

@media (min-width: 640px) {
    .form-group label {
        font-size: 0.9375rem;
    }
}

.form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 16px; /* Prevent iOS zoom on focus */
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background-color: var(--bg-white);
    color: var(--text-dark);
    width: 100%;
    min-height: 48px; /* Touch-friendly minimum */
}

.form-group select,
.form-group textarea {
    padding: 0.75rem 0.875rem;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background-color: var(--bg-white);
    color: var(--text-dark);
    width: 100%;
}

@media (min-width: 640px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem 1rem;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}

.helper-text {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

@media (min-width: 640px) {
    .helper-text {
        font-size: 0.8125rem;
    }
}

/* Reset Button */
.reset-btn {
    margin-top: 1rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 400;
    font-family: inherit;
    color: var(--text-light);
    background-color: transparent;
    border: none;
    border-bottom: 1px dashed var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.reset-btn::before {
    content: "↺";
    font-size: 0.9375rem;
}

.reset-btn:hover {
    color: var(--text-medium);
    border-bottom-color: var(--text-light);
}

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

/* Warning Area */
.warning-area {
    margin-top: 1rem;
}

.warning-message {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
}

.warning-message.error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #FCA5A5;
}

.warning-message.warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

/* Results Card - New Design */
.results-card {
    background: var(--bg-white);
}

.results-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.results-grid-v2 {
    display: grid;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .results-grid-v2 {
        gap: 1rem;
    }
}

@media (min-width: 640px) {
    .results-grid-v2 {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .results-grid-v2 {
        gap: 1.25rem;
    }
}

/* Gradient Highlight Cards */
.result-highlight-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-highlight-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    color: white;
}

.result-highlight-secondary {
    background: linear-gradient(135deg, var(--secondary-teal) 0%, var(--primary-blue) 100%);
    color: white;
}

.result-highlight-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
}

.result-highlight-value {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 375px) {
    .result-highlight-value {
        font-size: 1.75rem;
    }
}

@media (min-width: 480px) {
    .result-highlight-value {
        font-size: 2rem;
    }
}

/* Bordered Stat Cards */
.result-stat-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-stat-primary {
    border: 2px solid var(--primary-blue);
}

.result-stat-secondary {
    border: 2px solid var(--secondary-teal);
}

.result-stat-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
}

.result-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 375px) {
    .result-stat-value {
        font-size: 1.625rem;
    }
}

@media (min-width: 480px) {
    .result-stat-value {
        font-size: 1.75rem;
    }
}

.result-stat-primary .result-stat-value {
    color: var(--primary-blue);
}

.result-stat-secondary .result-stat-value {
    color: var(--secondary-teal);
}

.result-stat-sublabel {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Formulas Section */
.formulas-section {
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.formulas-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.formulas-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.formulas-list li {
    font-size: 0.8125rem;
    color: var(--text-medium);
    line-height: 1.5;
}

@media (min-width: 480px) {
    .formulas-list li {
        font-size: 0.875rem;
    }
}

/* ========================================
   Profit/Loss Projection Table
   ======================================== */
.scenario-section {
    margin-bottom: 1.5rem;
}

.projection-card {
    padding: 1.5rem;
}

.table-container {
    overflow-x: auto;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

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

.projection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    min-width: 500px;
}

@media (min-width: 480px) {
    .projection-table {
        font-size: 0.875rem;
    }
}

@media (min-width: 640px) {
    .projection-table {
        font-size: 0.9375rem;
    }
}

.projection-table th,
.projection-table td {
    padding: 0.75rem 0.5rem;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
}

@media (min-width: 375px) {
    .projection-table th,
    .projection-table td {
        padding: 0.875rem 0.625rem;
    }
}

@media (min-width: 640px) {
    .projection-table th,
    .projection-table td {
        padding: 1rem;
    }
}

.projection-table th:first-child,
.projection-table td:first-child {
    text-align: left;
}

/* Gradient Header */
.projection-table thead tr {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
}

.projection-table th {
    font-weight: 600;
    color: white;
    border-bottom: none;
}

.projection-table th:first-child {
    border-top-left-radius: var(--radius-md);
}

.projection-table th:last-child {
    border-top-right-radius: var(--radius-md);
}

.projection-table tbody tr:hover {
    background-color: var(--bg-light);
}

.projection-table tbody tr.highlight-row {
    background-color: rgba(10, 116, 218, 0.08);
    font-weight: 600;
}

.projection-table tbody tr.highlight-row td {
    border-bottom: 2px solid var(--primary-blue);
}

.projection-table .empty-row td {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

.projection-table .positive {
    color: var(--secondary-teal);
    font-weight: 600;
}

.projection-table .negative {
    color: #DC2626;
    font-weight: 600;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    margin-bottom: 1.5rem;
}

.cta-card {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-color: var(--primary-blue);
}

.cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

@media (min-width: 375px) {
    .cta-title {
        font-size: 1.375rem;
    }
}

@media (min-width: 640px) {
    .cta-title {
        font-size: 1.5rem;
    }
}

.cta-subtitle {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .cta-buttons {
        gap: 0.875rem;
        max-width: 400px;
    }
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    min-height: 48px; /* Touch-friendly */
    text-align: center;
    line-height: 1.4;
}

@media (min-width: 375px) {
    .cta-btn {
        padding: 0.875rem 1.5rem;
    }
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: var(--secondary-teal);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: #0D9488;
}

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

.btn-tertiary:hover {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}

@media (min-width: 640px) {
    .cta-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    padding: 3rem 0 0;
    margin-top: 2rem;
    color: white;
}

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

.footer-grid > * {
    min-width: 0;
}

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

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(4, 1fr);
        gap: 2rem 1.5rem;
    }
}

@media (min-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(4, 1fr);
        gap: 2rem 2.5rem;
    }
}

/* Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-icon svg {
    width: 1.375rem;
    height: 1.375rem;
    color: white;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.footer-logo-subtitle {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.footer-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 320px;
}

/* Links Columns */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
}

.footer-links-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 900px) {
    .footer-links-list {
        gap: 0.625rem;
    }
}

.footer-links-list a {
    display: inline-block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.125rem 0;
}

.footer-links-list a:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-bottom {
    padding: 1.25rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Tools Grid
   ======================================== */
.tools-grid-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
}

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

@media (min-width: 480px) {
    .tools-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

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

.tool-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
    .tool-card {
        padding: 1.75rem;
    }
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.tool-card.featured {
    border-color: var(--primary-blue);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(20, 184, 166, 0.03) 100%);
}

.tool-card.featured:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
}

.tool-icon {
    font-size: 2.25rem;
    margin-bottom: 0.875rem;
    line-height: 1;
}

@media (min-width: 640px) {
    .tool-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

.tool-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
}

@media (min-width: 640px) {
    .tool-card h3 {
        font-size: 1.125rem;
    }
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .tool-card p {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
    width: 100%;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* ========================================
   Lead Form
   ======================================== */
.lead-capture-section {
    margin-bottom: 2rem;
}

/* Lead Card - Modern Design */
.lead-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.lead-card-header {
    background: linear-gradient(135deg, var(--secondary-teal) 0%, #2DD4BF 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.lead-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.lead-card-header-text h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.lead-card-header-text p {
    font-size: 0.9375rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.95;
    color: white;
}

.lead-card-body {
    padding: 2rem;
}

@media (min-width: 768px) {
    .lead-card-header {
        padding: 1.75rem 2.5rem;
    }
    
    .lead-card-body {
        padding: 2.5rem;
    }
}

/* Lead Card Header Color Variants */
.lead-header-green {
    background: linear-gradient(135deg, var(--secondary-teal) 0%, #2DD4BF 100%);
}

.lead-header-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.lead-header-orange {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
}

.lead-header-blue {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #60A5FA 100%);
}

.lead-header-pink {
    background: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
}

/* Lead Section V2 - Matching Design Reference */
.lead-section-v2 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    padding: 2rem 0.75rem;
    margin: 1.5rem 0;
}

@media (min-width: 375px) {
    .lead-section-v2 {
        padding: 2.5rem 1rem;
    }
}

@media (min-width: 640px) {
    .lead-section-v2 {
        padding: 3rem 1.5rem;
        margin: 2rem 0;
    }
}

.lead-container-v2 {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lead-title-v2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

@media (min-width: 375px) {
    .lead-title-v2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) {
    .lead-title-v2 {
        font-size: 1.75rem;
    }
}

.lead-subtitle-v2 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.lead-form-box-v2 {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 375px) {
    .lead-form-box-v2 {
        padding: 1.5rem;
    }
}

@media (min-width: 640px) {
    .lead-form-box-v2 {
        padding: 2rem;
    }
}

.lead-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row-v2 {
        grid-template-columns: 1fr;
    }
}

.form-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    text-align: left;
}

.form-group-v2 label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group-v2 input,
.form-group-v2 select {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    color: var(--text-dark);
    min-height: 44px;
}

.form-group-v2 input:focus,
.form-group-v2 select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lead-btn-v2 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.lead-btn-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Lead Form Note */
.lead-form-note {
    font-size: 0.875rem;
    color: var(--text-medium);
    text-align: center;
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* CTA Break-Even Dynamic Value */
#cta-break-even {
    color: #FFD700;
    font-weight: 700;
}

/* Product Row Styles for Multi-Product Calculator */
.product-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-row {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.product-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.product-number {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.btn-remove-product {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-product:hover {
    background: #dc2626;
}

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 640px) {
    .form-row.three-col {
        grid-template-columns: 1fr;
    }
}

.form-row.two-col {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .form-row.two-col {
        grid-template-columns: 1fr;
    }
}

.mix-total {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.mix-total.warning {
    background: #fef3c7;
    color: #92400e;
}

.mix-total span {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Product Results */
.product-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.product-results-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.product-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-result-item {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    border-left: 3px solid var(--primary-blue);
}

.product-result-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

.product-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.product-result-details span {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Input Section Title */
.input-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

/* Timeline Card Highlight */
#timeline-card {
    background: linear-gradient(135deg, #0A74DA 0%, #00BFA5 100%);
    color: white;
}

#timeline-card .result-highlight-label {
    color: rgba(255, 255, 255, 0.9);
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.lead-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.lead-form label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
}

.lead-form input,
.lead-form select {
    padding: 0.875rem 1rem;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    color: var(--text-dark);
    min-height: 48px;
}

.lead-form input:focus,
.lead-form select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lead-form input.error {
    border-color: #DC2626;
}

.field-error {
    font-size: 0.8125rem;
    color: #DC2626;
    margin-top: 0.25rem;
}

.success-message {
    background-color: var(--success-bg);
    color: var(--success-text);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: left;
    border: 1px solid #BBF7D0;
}

.success-message h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.contact-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

@media (min-width: 640px) {
    .contact-form {
        padding: 2rem;
    }
}

.contact-form-grid {
    display: grid;
    gap: 1.25rem;
}

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

.contact-form .form-group {
    margin-bottom: 0;
}

.contact-form label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    transition: var(--transition);
    color: var(--text-dark);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-light);
}

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

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.contact-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.contact-form-note {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.contact-submit {
    min-width: 180px;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-weight: 600;
}

/* Contact Methods */
.contact-methods {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

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

.contact-method {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.contact-method h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.contact-method p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.contact-method ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.contact-method li {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.contact-method a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.contact-method a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
}

.success-message h3 {
    color: #059669;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.success-message p {
    color: #047857;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.success-message a {
    color: #059669;
    font-weight: 500;
}

/* Form Error */
.form-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    color: #dc2626;
    font-size: 0.9375rem;
}

/* Office Info */
.office-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin: 1rem 0;
}

.office-info p {
    margin: 0.25rem 0;
    font-size: 0.9375rem;
    color: var(--text-medium);
}

.office-info p:first-child {
    margin-top: 0;
}

.office-info p:last-child {
    margin-bottom: 0;
}

.office-info em {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-section {
    margin-bottom: 2rem;
}

.faq-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.faq-item p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ========================================
   Content Section
   ======================================== */
.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
}

.content-section p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ========================================
   Results Grid - Legacy Support (for other calculators)
   ======================================== */
.results-grid {
    display: grid;
    gap: 0.875rem;
}

@media (min-width: 480px) {
    .results-grid {
        gap: 1rem;
    }
}

@media (min-width: 640px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .results-grid {
        gap: 1.25rem;
    }
}

/* Result Item Cards */
.result-item {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item.highlight {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    color: white;
    border: none;
}

.result-item.highlight-secondary {
    background: linear-gradient(135deg, var(--secondary-teal) 0%, var(--primary-blue) 100%);
    color: white;
    border: none;
}

.result-item.profit-item {
    border: 2px solid var(--primary-blue);
}

.result-item.profit-item .result-value {
    color: var(--primary-blue);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
}

.result-item.highlight .result-label,
.result-item.highlight-secondary .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

@media (min-width: 375px) {
    .result-value {
        font-size: 1.625rem;
    }
}

@media (min-width: 480px) {
    .result-value {
        font-size: 1.75rem;
    }
}

.result-item.highlight .result-value,
.result-item.highlight-secondary .result-value {
    color: white;
}

/* ========================================
   SEO Content Section
   ======================================== */
.seo-content-section {
    margin: 3rem 0;
}

.seo-content-card {
    padding: 2.5rem;
}

.seo-content-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.seo-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
    line-height: 1.4;
}

.seo-article h3:first-child {
    margin-top: 0;
}

.seo-article p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.seo-article ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.seo-article li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.seo-article a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.seo-article a:hover {
    text-decoration: underline;
}

.formula-box {
    background: linear-gradient(135deg, var(--bg-light) 0%, #f0f7ff 100%);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
}

.formula-box p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* ========================================
   Mobile Scroll Buttons
   ======================================== */
.see-results-btn,
.back-to-form {
    position: fixed;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(10, 116, 218, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    z-index: 100;
}

.see-results-btn {
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    white-space: nowrap;
}

.see-results-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.see-results-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 116, 218, 0.45);
}

.see-results-btn svg {
    width: 20px;
    height: 20px;
    animation: bounceDown 1.5s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.back-to-form {
    bottom: 1.5rem;
    left: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.back-to-form.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-form:hover {
    transform: translateY(-2px);
}

.back-to-form svg {
    width: 20px;
    height: 20px;
}

/* Hide scroll buttons on desktop */
@media (min-width: 769px) {
    .see-results-btn,
    .back-to-form {
        display: none !important;
    }
}

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