/* ContractorPro - Construction Business Framework Styles */

:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --secondary: #c9a227;
    --secondary-light: #e0b83a;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    padding: 0 1.5rem;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-actions {
    display: flex;
    gap: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--secondary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

.btn-full {
    width: 100%;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
}

/* Hero Section */
.hero {
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card {
    background: var(--white);
    color: var(--gray-800);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 380px;
}

.card-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-badge, .license-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.license-badge {
    background: #dbeafe;
    color: #1e40af;
}

.hero-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.check-item.done {
    color: var(--gray-700);
}

.check-item.pending {
    color: var(--gray-400);
}

/* Sections */
.section {
    padding: 5rem 1.5rem;
}

.section-dark {
    background: var(--gray-50);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* State Selector */
.state-selector {
    max-width: 500px;
    margin: 0 auto;
}

.state-dropdown {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.state-dropdown:focus {
    outline: none;
    border-color: var(--primary);
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    transition: all 0.3s;
}

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

.pricing-card.popular {
    border-color: var(--secondary);
    box-shadow: var(--shadow-xl);
}

.pricing-card.popular::before {
    content: "Most Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--gray-900);
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.price .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.price .period {
    color: var(--gray-500);
}

.pricing-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    font-size: 0.875rem;
}

.pricing-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
}

.pricing-features li.disabled {
    color: var(--gray-400);
}

.pricing-features li.disabled::before {
    content: "×";
    color: var(--gray-300);
}

/* SBA Add-on Section */
.sba-addon {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.sba-addon-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sba-addon-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.sba-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.sba-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.sba-pricing {
    text-align: center;
}

.sba-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.sba-price-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.sba-bundle-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 4rem 1.5rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto 3rem;
}

.footer-brand p {
    color: var(--gray-400);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
}

.modal-content.modal-lg {
    max-width: 800px;
}

.modal-content.modal-sm {
    max-width: 400px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-details p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.cart-item-price {
    font-weight: 700;
    font-size: 1.125rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
}

.cart-summary {
    padding-top: 1rem;
    border-top: 2px solid var(--gray-200);
}

.cart-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cart-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Checkout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.checkout-form h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.checkout-form h3:first-child {
    margin-top: 0;
}

.checkout-summary {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    height: fit-content;
}

.checkout-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.checkout-items {
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-300);
}

.secure-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

/* Success Modal */
.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.delivery-info {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    text-align: left;
}

.delivery-info h4 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.delivery-info ul {
    list-style: none;
}

.delivery-info li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

    .hero-visual {
        display: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

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

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

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

    .sba-addon {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

@media (max-width: 768px) {
    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu.active {
        display: flex;
    }

    .hero {
        padding-top: 6rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

/* Utility Classes */
.savings-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.addon-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}
