* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #f9f9f9;
    color: #333;
}

header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    border-bottom: 3px solid #05185e;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}
.error-message {
    margin-top: 5px;
    font-size: 0.8em;
    color: red;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-bottom: 2px solid #05185e;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: border-bottom 0.3s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

input[style*="2px solid red"] {
    animation: shake 0.3s;
}

.logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo-image {
    width: 85px;
    height: auto;
}

.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.nav-center ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-center ul li a {
    color: #05185e;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-center ul li a:hover {
    color: #ff6347;
}

.consultation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-left: 3rem;
}

.consultation-button,
.logout-button {
    font-size: 16px;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.3s;
}

.consultation-button {
    background-color: #05185e;
}

.consultation-button:hover,
.logout-button:hover {
    background-color: #333;
}

.logout-button {
    background-color: #ff6347;
}

#eligibility-form {
    width: 90%;
    max-width: 1200px;
    margin: 100px auto 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: right;
}

#eligibility-form h2 {
    text-align: center;
    color: #05185e;
    font-size: 28px;
    margin-bottom: 20px;
}

form label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 15px 0 5px;
}

form input, form select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    margin-top: 5px;
}

button[type="submit"],
button[type="button"] {
    background-color: #05185e;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 20px auto 0;
    display: block;
    max-width: 200px;
    width: 100%;
    transition: background-color 0.3s;
}

button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: #333;
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.step.active {
    color: #05185e;
    border-bottom: 2px solid #05185e;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-size: 18px;
    font-weight: bold;
    color: #05185e;
    padding: 0 10px;
}

#error-message {
    font-size: 14px;
    color: red;
    text-align: center;
    margin-top: 10px;
}

main {
    width: 90%;
    max-width: 1200px;
    margin-top: 150px;
    text-align: center;
}

h1 {
    color: #05185e;
    font-size: 28px;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: center;
}

th {
    background-color: #05185e;
    color: white;
    font-weight: bold;
}

td {
    background-color: #f9f9f9;
}

.two-columns label {
    width: 48%;
    display: inline-block;
    margin: 1%;
    font-size: 16px;
    color: #333;
    vertical-align: top;
}

.two-columns fieldset {
    display: flex;
    flex-wrap: wrap;
}

.two-columns label select,
.two-columns label input {
    width: 100%;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.step-content button {
    width: auto;
    margin: 0 5px;
}

@media (max-width: 768px) {
    #eligibility-form {
        width: 100%;  
        margin: 0;
        padding: 20px;
    }

    .two-columns label {
        width: 100%; 
        margin: 1% 0; 
    }
    
    .steps {
        flex-direction: column; 
    }
}
