/* BuildEstimate Nigeria - Complete Styles */

:root {
    --primary: #1a5f2a;
    --primary-dark: #124a1f;
    --primary-light: #2d8a42;
    --secondary: #f4a261;
    --accent: #e76f51;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-logo small {
    font-size: 0.75rem;
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
}

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

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

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

.nav-btn {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
}

.nav-mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-badges span {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.hero-btn {
    background: var(--secondary);
    color: var(--dark);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.hero-price {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.hero-card {
    background: var(--white);
    color: var(--dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-card-header {
    background: var(--gray-light);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.hero-card-body {
    padding: 1.5rem;
}

.sample-line {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.sample-line.total {
    border-top: 2px solid var(--primary);
    border-bottom: none;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: 700;
    color: var(--primary);
}

/* App Container */
.app-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gray);
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--primary);
    color: var(--white);
}

.step.completed .step-number {
    background: var(--primary-light);
    color: var(--white);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 700;
}

.step-line {
    width: 60px;
    height: 3px;
    background: var(--gray-light);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.step-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.step-header h2 i {
    margin-right: 0.5rem;
}

.toggle-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    border: 1px solid var(--gray-light);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

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

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-group input,
.form-group select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

/* Category Cards */
.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.category-header {
    padding: 1.2rem 1.5rem;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.category-header:hover {
    background: #dee2e6;
}

.category-header i:first-child {
    transition: transform 0.3s;
}

.category-header.collapsed i:first-child {
    transform: rotate(-90deg);
}

.category-header h3 {
    flex: 1;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.85rem;
    color: var(--gray);
    background: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.category-items {
    padding: 1rem 1.5rem;
}

.category-items.collapsed {
    display: none;
}

/* Item Row */
.item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-light);
}

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

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-light);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--gray);
}

.item-unit {
    font-size: 0.85rem;
    color: var(--gray);
    background: var(--gray-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-light);
}

.btn-prev,
.btn-next,
.btn-pay {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-prev {
    background: var(--gray-light);
    color: var(--dark);
}

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

.btn-pay {
    background: var(--secondary);
    color: var(--dark);
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
}

.btn-prev:hover,
.btn-next:hover,
.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Review Section */
.review-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.review-summary h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.review-item {
    background: var(--gray-light);
    padding: 1rem;
    border-radius: var(--radius);
}

.review-item label {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
    margin-bottom: 0.3rem;
}

.review-item value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

/* Estimate Table */
.estimate-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.estimate-table table {
    width: 100%;
    border-collapse: collapse;
}

.estimate-table th {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.estimate-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.estimate-table tr:hover {
    background: var(--gray-light);
}

.estimate-table .section-header {
    background: #e8f5e9;
    font-weight: 700;
    color: var(--primary);
}

.estimate-table .total-row {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Price Input */
.price-input {
    width: 120px;
    padding: 0.5rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    text-align: right;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Payment Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.modal-features {
    text-align: left;
    margin: 1.5rem 0;
}

.modal-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-features i {
    color: var(--primary);
}

.paystack-btn {
    background: #011b33;
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: all 0.3s;
}

.paystack-btn:hover {
    background: #053a66;
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

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

/* How It Works */
.how-it-works {
    background: var(--white);
    padding: 4rem 2rem;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

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

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-card .number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card h3 {
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Pricing Section */
.pricing {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.pricing h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    border: 3px solid var(--primary);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 400;
}

.pricing-features {
    text-align: left;
    margin: 2rem 0;
    list-style: none;
}

.pricing-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features i {
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }

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

    .nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: block;
    }

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

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

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

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step-line {
        display: none;
    }

    .step-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-prev,
    .btn-next,
    .btn-pay {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .progress-steps,
    .step-actions,
    .footer,
    .modal-overlay {
        display: none !important;
    }

    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .estimate-table {
        box-shadow: none;
        border: 1px solid #000;
    }
}
