/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header/Hero Section */
.hero {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(247, 147, 30, 0.3);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

.time-estimate {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.time-estimate .icon {
    margin-right: 8px;
}

/* Progress Indicator */
.progress-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e7ff;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

/* Quick Checklist */
.checklist {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.checklist h3 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.checklist-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.checklist-item {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Form Sections */
.intake-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-section {
    display: none;
    padding: 40px;
}

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

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 8px;
}

.section-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: #ff6b35;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:valid {
    border-color: #10b981;
}

.helper-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Comparison Cards */
.comparison-container {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.option-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.option-card.recommended {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fff4, #ecfdf5);
}

.option-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.option-header input[type="radio"] {
    width: auto;
    margin-top: 2px;
}

.option-header label {
    flex: 1;
    margin-bottom: 0;
    cursor: pointer;
}

.recommended-badge {
    background: #10b981;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 600;
}

.option-details ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.option-details li {
    padding: 4px 0;
    font-size: 0.9rem;
}

/* Port Details */
.port-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.port-details h4 {
    color: #374151;
    margin-bottom: 15px;
}

/* Optional Sections */
.optional-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 25px;
    margin-top: 30px;
}

.optional-section h3 {
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.optional-badge {
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: auto;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

.prev-btn, .next-btn, .submit-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.prev-btn {
    background: #f3f4f6;
    color: #374151;
}

.prev-btn:hover {
    background: #e5e7eb;
}

.next-btn, .submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    margin-left: auto;
}

.next-btn:hover, .submit-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #f7931e, #e67e22);
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

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

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-content h2 {
    color: #1f2937;
    margin-bottom: 15px;
}

.next-steps {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.next-steps h3 {
    color: #374151;
    margin-bottom: 10px;
}

.next-steps ol {
    margin-left: 20px;
}

.next-steps li {
    margin-bottom: 5px;
    color: #6b7280;
}

.contact-info {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checklist-items {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .prev-btn {
        order: 2;
    }
    
    .next-btn, .submit-btn {
        order: 1;
        margin-left: 0;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 20px 15px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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

/* Validation States */
.form-group.error input,
.form-group.error select {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success input,
.form-group.success select {
    border-color: #10b981;
}

.form-group.success::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Focus States for Accessibility */
button:focus, input:focus, select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
        color: #fff;
    }
    
    .option-card.recommended {
        background: #fff;
        border-color: #000;
    }
}