* {
    font-family: 'Tajawal', sans-serif;
}

.hero-bg-form {
    background: linear-gradient(135deg, rgba(75, 85, 120, 0.7), rgba(100, 50, 80, 0.7)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="water" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M0,50 Q25,40 50,50 T100,50" stroke="rgba(200,200,200,0.1)" fill="none"/></pattern></defs><rect fill="%236B5B95" width="1200" height="600"/><use href="%23water" y="0"/><use href="%23water" y="50"/><use href="%23water" y="100"/></svg>');
    background-size: cover;
    background-position: center;
}

/* Form input animation */
.form-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
}

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

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

/* Input styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #FFA500;
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
    transform: translateY(-2px);
}

/* Form validation styles */
.input-error {
    border-color: #EF4444 !important;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Submit button animation */
.submit-btn {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 165, 0, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Progress indicator */
.progress-step {
    display: flex;
    align-items: center;
    position: relative;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6B7280;
    transition: all 0.3s ease;
}

.step-number.active {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: white;
    transform: scale(1.1);
}

.step-number.completed {
    background: #10B981;
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin: 0 8px;
    transition: background 0.3s ease;
}

.step-line.completed {
    background: #10B981;
}

/* Card container */
.form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #F3F4F6;
    transition: all 0.3s ease;
}

.form-card:hover {
    box-shadow: 0 20px 50px rgba(255, 165, 0, 0.1);
    border-color: #FCD34D;
}

/* Checkbox styling */
.checkbox-custom {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom .checkmark {
    position: absolute;
    top: 0;
    right: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #FFA500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-custom input:checked ~ .checkmark {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    border-color: #FFA500;
}

.checkbox-custom input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-custom .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Success message */
.success-message {
    background: #D1FAE5;
    border: 2px solid #10B981;
    color: #065F46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
    animation: slideInUp 0.5s ease;
}

.success-message.show {
    display: block;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    color: #FFA500;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}