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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Styles */
.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="white" fill-opacity="0.05"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/><circle cx="17" cy="7" r="2"/></g></svg>') repeat;
}

.header-content {
    position: relative;
    z-index: 2;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.icon-wrapper i {
    font-size: 32px;
    color: white;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto;
}

/* Form Styles */
.intake-form {
    padding: 40px 30px;
}

.form-section {
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f4f8;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: #667eea;
    font-size: 1.3rem;
}

.section-header p {
    color: #718096;
    font-size: 0.95rem;
}

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

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

label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

label.required::after {
    content: ' *';
    color: #e53e3e;
    font-weight: 600;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
    appearance: none;
}

/* Checkbox Styles */
.checkbox-group {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-weight: 400;
}

.checkbox-label:hover {
    border-color: #cbd5e0;
    background: white;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #667eea;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Error Messages */
.error-message {
    display: block;
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 5px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-group.error .error-message {
    opacity: 1;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e53e3e;
    background: #fef5f5;
}

/* Submit Button */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-width: 200px;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.success-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.success-content i {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 20px;
}

.success-content h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 600;
}

.success-content p {
    color: #718096;
    line-height: 1.6;
}

/* Utility Classes */
.mt-2 {
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px 0;
    }
    
    .container {
        margin: 0 10px;
        border-radius: 15px;
    }
    
    .form-header {
        padding: 30px 20px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .intake-form {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkbox-group {
        gap: 8px;
    }
    
    .checkbox-label {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 16px 30px;
    }
    
    .success-content {
        margin: 10px;
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        padding: 12px 14px;
    }
}

/* Loading State */
.loading .submit-btn {
    position: relative;
    color: transparent;
}

.loading .submit-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Form Animation */
.form-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }
.form-section:nth-child(6) { animation-delay: 0.6s; }
.form-section:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}