/* Existing Styles remain, adding Lang Switch */
:root {
    --primary-color: #00897B;
    --primary-dark: #00695C;
    --secondary-color: #FF80AB;
    --secondary-light: #FFEEF4;
    --text-color: #2D3748;
    --text-light: #718096;
    --bg-color: #F7FAFC;
    --card-bg: #FFFFFF;
    --border-radius: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ar);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

/* Background Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.shape-1 {
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: var(--secondary-light);
}

.shape-2 {
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: #E0F2F1;
}

/* Header & Lang Switch */
.main-header {
    text-align: center;
    padding: 1rem 1rem 2rem;
    position: relative;
}

.lang-switch-container {
    display: flex;
    justify-content: flex-end;
    padding: 0 1rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

/* RTL/LTR specific positioning for Lang Switch if needed, but flex-end works for both */
body[dir="ltr"] .lang-switch-container {
    /* If we want it on the right in LTR too, justify-content: flex-end is fine. 
       If we want it on the left? typically lang switch is top right. */
}

.btn-lang {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-lang:hover {
    background: var(--primary-color);
    color: white;
}

.main-header h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
}

/* Cards */
.intro-card,
.form-section,
.success-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.intro-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Study Info Icons */
.study-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.info-item .icon {
    font-size: 2rem;
    background: var(--secondary-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary,
.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.4);
    min-width: 200px;
}

.btn-primary:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.6);
}

.btn-next {
    background-color: var(--primary-color);
    color: white;
}

/* RTL/LTR Logic for Next/Prev Buttons layout */
body[dir="rtl"] .btn-next {
    margin-right: auto;
}

body[dir="ltr"] .btn-next {
    margin-left: auto;
}


.btn-prev {
    background-color: #CBD5E0;
    color: var(--text-color);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Form Styles */
.hidden {
    display: none !important;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-light);
}

.question-group {
    margin-bottom: 2rem;
}

.question-group label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Option Cards (Radio Replacement) */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.toggle-options {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.option-card {
    position: relative;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

.option-card:hover {
    border-color: var(--primary-color);
    background-color: #F0FDFA;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card:has(input:checked) {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 137, 123, 0.3);
}

/* Checkbox Cards */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0 !important;
}

.checkbox-card:hover {
    background-color: #f8f9fa;
}

.checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background-color: #E2E8F0;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    width: 0%;
    transition: width 0.4s ease;
}

/* Success Message */
.success-card {
    text-align: center;
    padding: 4rem 2rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: #C6F6D5;
    color: #276749;
    font-size: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
    .main-header h1 {
        font-size: 1.5rem;
    }

    .intro-card,
    .form-section {
        padding: 1.5rem;
    }

    .options {
        grid-template-columns: 1fr;
    }
}