:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: var(--transition);
    margin: 0 5px;
    border-radius: 8px;
    padding: 8px 16px !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(37, 99, 235, 0.1);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-bg);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>') repeat;
    animation: float 20s infinite linear;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

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

/* Buttons */
.btn-custom {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    border: none;
    margin: 5px;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.btn-primary-custom:hover {
    background: #d97706;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-2px);
}

/* Cards and Containers */
.form-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
    position: relative;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    margin-bottom: 1rem;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    height: 100%;
    transition: var(--transition);
}

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

/* Form Styles */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-check-card {
    position: relative;
}

.form-check-card .form-check-input {
    position: absolute;
    opacity: 0;
}

.form-check-card .card {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e9ecef;
}

.form-check-card .form-check-input:checked + .form-check-label .card {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

/* Specific Page Styles */

/* FSBO Page */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    transition: var(--transition);
}

.step.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.completed {
    background: var(--secondary-color);
    color: white;
}

.step-line {
    width: 50px;
    height: 2px;
    background: #e9ecef;
    transition: var(--transition);
}

.step-line.completed {
    background: var(--secondary-color);
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

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

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

/* Rebate Page */
.rebate-display {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

/* Monetization Page */
.monetization-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border-left: 4px solid var(--primary-color);
}

.monetization-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.earning-potential {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Course Page */
.course-module {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border-top: 4px solid var(--primary-color);
}

.course-module:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.module-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.module-content {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.module-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    padding-left: 1rem;
}

.module-content li:last-child {
    border-bottom: none;
}

.module-content li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.75rem;
}

.module-duration {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.benefit-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

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

/* Contact Page */
.contact-info {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    height: fit-content;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-details h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Network Map */
#map {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.map-controls {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

/* Trends Page */
.trend-chart {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-top: 5rem;
}

/* Step Numbers for How It Works */
.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-custom {
        width: 100%;
        margin: 5px 0;
    }
    
    .step-indicator {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-line {
        width: 2px;
        height: 30px;
    }
    
    .form-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto 1rem;
    }
}

@media (max-width: 576px) {
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .feature-card,
    .form-container {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Alert Styles */
.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    border-radius: var(--border-radius);
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    border-radius: var(--border-radius);
}

.alert-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    border-radius: var(--border-radius);
}

/* Modal Improvements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal-header {
    border-bottom: 1px solid #f8f9fa;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}
