.registration-section {
    padding: 100px 0;
    position: relative;
}

.glass-form-wrapper {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.30); /* Glass opacity */
    backdrop-filter: blur(15px); /* Strong blur for Apple look */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    padding: 60px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.06);
    text-align: center;
}

.form-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centers the badge and text horizontally */
    justify-content: center;
    margin-bottom: 50px;    /* Space between header and the glass form */
}

.form-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary);
    margin: 15px 0;
    width: 100%;           /* Ensures text alignment works */
}

.form-header p {
    max-width: 600px;      /* Prevents the description from being too wide */
    margin: 0 auto;
}


.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.7);
    font-family: 'Almarai', sans-serif;
    transition: all 0.3s ease;
    text-align: right !important;
    direction: rtl !important;
}

/* Specifically target the placeholder for Phone and Email */
.input-group input::placeholder {
    text-align: right !important;
    direction: rtl !important;
}

.input-group input[type="tel"], 
.input-group input[type="email"] {
    text-align: right !important;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 63, 89, 0.05);
}

/* --- Filtering Logic UI --- */
.filter-questions {
    margin: 40px 0;
    text-align: right;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.question-text {
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    flex: 1;
}

.boolean-toggle {
    display: flex;
    background: rgba(0,0,0,0.06);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    direction: ltr; /* Keeps buttons properly ordered */
}

/* Hide the actual radio circle */
.boolean-toggle input[type="radio"] {
    display: none;
}

/* Style the labels as buttons */
.boolean-toggle label {
    padding: 10px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Color when checked */
.boolean-toggle input[type="radio"]:checked + label {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(11, 63, 89, 0.2);
}

.btn-wide {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 20px;
}

.vertical-filter {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px;
}

.goal-options {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.goal-options input { display: none; }

.option-label {
    display: block;
    padding: 15px 20px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
}

.goal-options input:checked + .option-label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 767px) {
    .glass-form-wrapper { padding: 40px 20px; border-radius: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .filter-item { flex-direction: column; gap: 20px; align-items: flex-start; }
    .boolean-toggle { width: 100%; justify-content: stretch; }
    .boolean-toggle label { flex: 1; text-align: center; }
}

/* The Shake Animation */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px); }
    40%, 80% { transform: translateX(7px); }
}

/* Error State for the Glass Card items */
.filter-item.error-highlight {
    animation: shakeError 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border: 1px solid rgba(255, 59, 48, 0.6) !important;
    background: rgba(255, 59, 48, 0.05) !important;
    padding: 15px;
    border-radius: 18px;
    margin-bottom: 10px;
}

.error-message {
    display: block;
    color: #ff3b30; /* Apple Red */
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
    text-align: right;
}