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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #E8F4F8 0%, #D0EBF1 50%, #B8E0EA 100%);
    min-height: 100vh;
    padding: 30px 20px;
}

.container {
    max-width: 850px;
    margin: 0 auto;
}

/* Form Section Card */
.form-section {
    background: #ffffff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    padding: 22px 28px;
    cursor: pointer;
    user-select: none;
}

.section-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #5DD3E0 0%, #3CC8D8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #2D3748;
    flex: 1;
}

.toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section Content */
.section-content {
    padding: 0 28px 28px;
}

/* Contact Header */
.contact-header {
    padding: 28px 28px 0;
}

.contact-title {
    color: #4A5FBD;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row.two-columns .form-group {
    flex: 1;
}

.form-row.three-columns .form-group {
    flex: 1;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.small-field {
    max-width: 130px;
}

.form-group.half-width {
    width: calc(50% - 10px);
}

.form-group.phone-field {
    max-width: 320px;
}

/* Labels */
label {
    font-size: 13px;
    color: #5A6A7A;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.required {
    color: #E53E3E;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    color: #2D3748;
    background: #EDF2F7;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23718096' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
    background: #E2E8F0;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
    color: #A0AEC0;
}

/* Validation States */
input.error,
select.error {
    background: #FFF5F5;
    box-shadow: 0 0 0 2px #FC8181;
}

input.error:focus,
select.error:focus {
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.3);
}

input.valid,
select.valid {
    background: #F0FFF4;
}

.error-message {
    color: #E53E3E;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
    display: block;
}

/* Date Selects */
.date-selects {
    display: flex;
    gap: 8px;
}

.date-selects select {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding-left: 10px;
    padding-right: 30px;
}

/* Date Inputs (manual entry) */
.date-inputs {
    display: flex;
    gap: 10px;
}

.date-inputs input {
    width: 70px;
    min-width: 0;
    text-align: center;
    padding: 12px 8px;
}

.date-inputs input#birthYear {
    width: 85px;
}

/* Date Input with Calendar Icon */
.date-input-wrapper {
    position: relative;
}

.date-input {
    width: 100%;
    padding-right: 45px !important;
}

.calendar-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 8px;
}

.phone-input select {
    width: 80px;
    flex-shrink: 0;
    text-align: center;
    padding-left: 8px;
    padding-right: 28px;
    background-position: right 8px center;
}

.phone-input input {
    flex: 1;
}

/* Required Note */
.required-note {
    color: #E53E3E;
    font-size: 13px;
    margin: 24px 0 20px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #4A5568;
    line-height: 1.5;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E0;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
    background: #ffffff;
}

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

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkmark.error {
    border-color: #E53E3E;
}

.checkbox-text {
    flex: 1;
}

.consent-link {
    color: #4A5FBD;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-link:hover {
    text-decoration: none;
}

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

.submit-btn {
    background: linear-gradient(135deg, #5DD3E0 0%, #3CC8D8 100%);
    color: #ffffff;
    border: none;
    padding: 16px 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(60, 200, 216, 0.35);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60, 200, 216, 0.45);
}

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

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .form-row.three-columns .form-group,
    .form-row.two-columns .form-group {
        flex: none;
        width: 100%;
    }

    .form-group.small-field,
    .form-group.half-width,
    .form-group.phone-field {
        max-width: 100%;
        width: 100%;
    }

    .date-selects {
        gap: 6px;
    }

    .phone-input {
        gap: 6px;
    }

    .section-header {
        padding: 18px 20px;
    }

    .section-content {
        padding: 0 20px 24px;
    }

    .contact-header {
        padding: 24px 20px 0;
    }
}

/* Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s ease;
}
