/* Care Assessment Page Specific Styles */

.care-assessment-main {
    margin-top: 80px;
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

/* Assessment Header */
.assessment-header {
    text-align: center;
    margin-bottom: 50px;
}

.assessment-intro {
    margin-bottom: 40px;
}

.intro-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #35a2ff 0%, #1e7ce8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.assessment-intro h1 {
    color: #333;
    margin-bottom: 1rem;
}

.assessment-intro p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #35a2ff 0%, #1e7ce8 100%);
    width: 14.28%; /* 100% / 7 steps */
    transition: width 0.5s ease;
}

.progress-text {
    color: #35a2ff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Assessment Form */
.assessment-form {
    max-width: 800px;
    margin: 0 auto;
}

.assessment-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.assessment-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #35a2ff 0%, #1e7ce8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.step-header h2 {
    color: #333;
    margin-bottom: 1rem;
}

.step-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Option Grid */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Living Situation Grid - Two Options in Single Row */
.living-situation-section .option-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Safety Section Grid - Two Options in Single Row */
.safety-section .option-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Activities Section Grid - Two Options in Single Row */
.activities-section .option-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Housekeeping Section Grid - Two Options in Single Row */
.housekeeping-section .option-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Transportation Section Grid - Two Options in Single Row */
.transportation-section .option-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.option-card {
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.option-card:hover {
    border-color: #35a2ff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(53, 162, 255, 0.1);
}

.option-card:has(input[type="radio"]:checked),
.option-card:has(input[type="checkbox"]:checked) {
    border-color: #4ade80 !important;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    color: #166534 !important;
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3) !important;
    position: relative;
    transform: translateY(-2px);
}

.option-card:has(input[type="radio"]:checked)::after,
.option-card:has(input[type="checkbox"]:checked)::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4ade80;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option-card:has(input[type="radio"]:checked) span,
.option-card:has(input[type="checkbox"]:checked) span {
    color: #166534 !important;
    font-weight: 600;
}

.option-card:hover .option-content {
    border-color: #35a2ff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(53, 162, 255, 0.1);
}

.option-card input[type="radio"]:checked + span,
.option-card input[type="checkbox"]:checked + span {
    color: #166534;
    font-weight: 600;
}

.option-card input[type="radio"]:checked + .option-content,
.option-card input[type="checkbox"]:checked + .option-content {
    border-color: #4ade80;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
    position: relative;
    transform: translateY(-2px);
}

.option-card input[type="radio"]:checked + .option-content::after,
.option-card input[type="checkbox"]:checked + .option-content::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4ade80;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option-card input[type="radio"]:checked + .option-content h3,
.option-card input[type="radio"]:checked + .option-content h4,
.option-card input[type="checkbox"]:checked + .option-content h3,
.option-card input[type="checkbox"]:checked + .option-content h4 {
    color: #166534;
    font-weight: 600;
}

.option-card input[type="radio"]:checked + .option-content p,
.option-card input[type="radio"]:checked + .option-content span,
.option-card input[type="checkbox"]:checked + .option-content p,
.option-card input[type="checkbox"]:checked + .option-content span {
    color: #166534;
    font-weight: 500;
}

.option-content h3,
.option-content h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.option-content p,
.option-content span {
    color: #666;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Selected state for option cards */
.option-card.selected {
    border-color: #4ade80 !important;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    color: #166534 !important;
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3) !important;
    position: relative;
    transform: translateY(-2px);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4ade80;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option-card.selected span {
    color: #166534 !important;
    font-weight: 600;
}

.option-content.selected {
    border-color: #4ade80 !important;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    color: #166534 !important;
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3) !important;
    position: relative;
    transform: translateY(-2px);
}

.option-content.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4ade80;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option-content.selected h3,
.option-content.selected h4 {
    color: #166534 !important;
    font-weight: 600;
}

.option-content.selected p,
.option-content.selected span {
    color: #166534 !important;
    font-weight: 500;
}

/* Section Labels */
.section-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Activity Groups */
.activities-section {
    margin-bottom: 30px;
}

.activity-group {
    margin-bottom: 30px;
}

.activity-group h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Safety Section */
.safety-section {
    margin-bottom: 30px;
}

.safety-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Housekeeping Section */
.housekeeping-section {
    margin-bottom: 30px;
}

/* Transportation Section */
.transportation-section {
    margin-bottom: 30px;
}

/* Contact Section */
.contact-section {
    margin-bottom: 30px;
}

.contact-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Save Progress */
.save-progress {
    text-align: center;
    margin-bottom: 30px;
}

.save-progress .btn-outline {
    background: transparent;
    color: #35a2ff;
    border: 2px solid #35a2ff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.save-progress .btn-outline:hover {
    background: #35a2ff;
    color: white;
}

/* Assessment Results */
.assessment-results {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-header {
    margin-bottom: 40px;
}

.results-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff8c00 0%, #e67e00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.results-header h2 {
    color: #333;
    margin-bottom: 1rem;
}

.results-header p {
    color: #666;
    font-size: 1.1rem;
}

.results-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: left;
}

.results-section {
    margin-bottom: 25px;
}

.results-section h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 2px solid #35a2ff;
    padding-bottom: 5px;
}

.results-section p {
    color: #666;
    margin-bottom: 0;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions .btn-outline {
    background: transparent;
    color: #35a2ff;
    border: 2px solid #35a2ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.results-actions .btn-outline:hover {
    background: #35a2ff;
    color: white;
}

/* Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group.error label {
    color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #35a2ff 0%, #1e7ce8 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.success-message.show {
    display: block;
    animation: slideDown 0.5s ease;
}

.success-message.message-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.success-message.message-success {
    background: linear-gradient(135deg, #ff8c00 0%, #e67e00 100%);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .care-assessment-main {
        padding: 20px 0;
    }
    
    .step-content {
        padding: 25px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .option-grid {
        grid-template-columns: 1fr;
    }
    
    /* Living Situation Grid - Stack on mobile */
    .living-situation-section .option-grid {
        grid-template-columns: 1fr;
    }
    
    /* Safety Section Grid - Stack on mobile */
    .safety-section .option-grid {
        grid-template-columns: 1fr;
    }
    
    /* Activities Section Grid - Stack on mobile */
    .activities-section .option-grid {
        grid-template-columns: 1fr;
    }
    
    /* Housekeeping Section Grid - Stack on mobile */
    .housekeeping-section .option-grid {
        grid-template-columns: 1fr;
    }
    
    /* Transportation Section Grid - Stack on mobile */
    .transportation-section .option-grid {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn-primary,
    .results-actions .btn-secondary,
    .results-actions .btn-outline {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    /* Living Situation Grid - 2 columns on tablet (same as desktop) */
    .living-situation-section .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Safety Section Grid - 2 columns on tablet (same as desktop) */
    .safety-section .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Activities Section Grid - 2 columns on tablet (same as desktop) */
    .activities-section .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Housekeeping Section Grid - 2 columns on tablet (same as desktop) */
    .housekeeping-section .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Transportation Section Grid - 2 columns on tablet (same as desktop) */
    .transportation-section .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .step-content {
        padding: 20px;
    }
    
    .assessment-intro h1 {
        font-size: 2rem;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .option-content {
        padding: 15px;
    }
    
    .results-content {
        padding: 20px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #35a2ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .assessment-step,
    .success-message {
        animation: none;
    }
    
    .progress-fill {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .option-content {
        border-width: 3px;
    }
    
    .progress-bar {
        border: 2px solid #000;
    }
    
    .step-content,
    .assessment-results {
        border: 2px solid #000;
    }
}

/* Focus Management */
.option-card:focus-within .option-content {
    outline: 2px solid #35a2ff;
    outline-offset: 2px;
}

.step-navigation button:focus,
.save-progress button:focus {
    outline: 2px solid #35a2ff;
    outline-offset: 2px;
}


