/* Professional Home Visit Healthcare Services - Design System */

:root {
    --primary: #0066cc;
    --primary-dark: #004a99;
    --primary-light: #e6f0ff;
    --secondary: #00a8a8;
    --secondary-light: #e0f7f7;
    --success: #10b981;
    --danger: #ef4444;
    --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;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #ffffff;
    letter-spacing: 0.3px;
}

/* ==== HEADER & NAVIGATION ==== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.95;
    margin-top: 0.25rem;
}

/* ==== CONTAINER & SPACING ==== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==== HERO / BANNER ==== */
.hero-banner {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

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

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==== BUTTONS ==== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

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

/* ==== SERVICES SECTION ==== */
.popular-services {
    background: white;
    border-radius: 8px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.popular-services h2 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 700;
}

.popular-services > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: left;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    height: 60px;
    width: 60px;
    background: var(--primary-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.service-card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-card-link:hover {
    text-decoration: underline;
}

/* ==== TRUST BADGES ==== */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.badge-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.badge span:not(.badge-icon) {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
}

/* ==== SERVICE INFO SECTION ==== */
.service-info {
    background: white;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.service-info h2 {
    color: var(--gray-900);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item {
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.info-item h3 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.coverage-area {
    background: var(--primary-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.coverage-area h3 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.coverage-area p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==== FORM CARD ==== */
.form-card {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.form-card h2 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn.loading {
    opacity: 0.8;
}

/* ==== MESSAGES ==== */
.success-message,
.error-message {
    display: none;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.success-message {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
}

/* ==== FAQ SECTION ==== */
.faq-section {
    background: white;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.faq-section h2 {
    color: var(--gray-900);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

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

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

.faq-question {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    margin-top: 0;
    padding-top: 0;
    font-size: 0.95rem;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 1rem;
}

.faq-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-toggle {
    transform: rotate(180deg);
}

/* ==== FOOTER ==== */
footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--gray-800);
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    margin: 1rem 0;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

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

    .hero-content p {
        font-size: 0.95rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .services-grid,
    .info-grid,
    .trust-badges {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==== UTILITY CLASSES ==== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* ==== VOICE RECORDING ==== */
.voice-section {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.voice-btn {
    padding: 0.75rem 1rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.voice-btn:hover {
    background: #008888;
}

.voice-btn.recording {
    background: #ef4444;
    animation: pulse 0.6s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

#voiceStatus {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

#audioPlayback {
    width: 100%;
    margin-top: 1rem;
}

/* ==== PROGRESSIVE MULTI-STEP FORM ==== */
#progressive-form-container {
    max-width: 500px;
    margin: 2rem auto;
}

.form-step {
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

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

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

.form-progress-wrapper {
    margin-bottom: 2rem;
}

.form-progress-bar {
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.form-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    width: 0%;
}

.form-step-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

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

.form-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Step Options - Buttons */
.step-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

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

.option-btn:active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-text strong {
    color: var(--gray-900);
    font-size: 1rem;
}

.option-text span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Service Selection */
.step-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-checkbox {
    cursor: pointer;
}

.service-checkbox input {
    display: none;
}

.service-card {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.service-checkbox input:checked + .service-card {
    border-color: var(--primary);
    background: var(--primary-light);
}

.service-checkbox:hover .service-card {
    border-color: var(--primary);
}

.service-icon {
    font-size: 2rem;
}

.service-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Form Inputs */
.form-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.form-control {
    padding: 0.85rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Form Summary */
.form-summary {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.summary-item .label {
    color: var(--text-secondary);
    font-weight: 600;
}

.summary-item .value {
    color: var(--gray-900);
    text-align: right;
}

/* Form Footer - Buttons */
.form-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-back,
.btn-next,
.btn-skip,
.btn-submit {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back,
.btn-skip {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-back:hover,
.btn-skip:hover {
    border-color: var(--text-secondary);
}

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

.btn-next:hover,
.btn-submit:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-submit {
    background: var(--success);
}

.btn-submit:hover {
    background: #10b981;
}

/* Success State */
.form-success {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 2px solid var(--success);
}

.success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--success);
}

.form-success h2 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ==== VOICE BUTTON & HELP TEXT ==== */
.voice-note-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.voice-note-btn {
    padding: 0.7rem 1.2rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.voice-note-btn:hover {
    background: #008888;
    box-shadow: var(--shadow-md);
}

.voice-note-btn.recording {
    background: #ef4444;
    animation: pulse 0.6s infinite;
}

.help-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.required {
    color: #ef4444;
}
