body {
    font-family: 'Arial', sans-serif;
    background-image: url('https://i0.wp.com/eng.uokerbala.edu.iq/wp/wp-content/uploads/2023/02/slide-1.jpg?fit=2299%2C1150&ssl=1'); 
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* تعديل لمحاذاة العناصر في الأعلى */
    height: 100vh;
    margin: 0;
    direction: rtl;
    position: relative;
    padding: 20px 0;
}

.photo-upload-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.custom-preview-container {
    width: 100px;
    height: 100px;
    border: 1px solid #2d0590;
    margin-left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.wrapper {
    background-color: rgba(107 199 223 / 80%);
    padding: 10px;
    border-radius: 10px;
    position: relative;
    z-index: 0;
    max-width: 700px;
    margin-top: 20px; /* تعديل لإضافة مساحة علوية */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

h1 {
    flex-grow: 1;
    text-align: center;
    margin: 0 10px;
}

.form-row {
    display: flex;
    justify-content: space-between;
}

.form-group {
    flex: 1;
    margin: 0 5px;
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.radio-buttons {
    display: flex;
    align-items: center;
}

.radio-buttons input[type="radio"] {
    margin-right: 3px;
    margin-left: 3px;
}

.form-buttons {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    flex-direction: ltr;
    margin-bottom: 2px;
    white-space: nowrap;
}

.checkbox-container label {
    margin-left: 290px;
}

button {
    padding: 8px 40px; 
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #00796b;
    color: white;
    font-size: 20px;
}

button:hover {
    opacity: 0.8;
}

.print-button {
    display: none;
}

@media print {
    body {
        margin: 0;
        padding: 0;
    }

    .wrapper {
        background-color: transparent;
        padding: 0;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    h1 {
        margin-top: 0;
    }

    form {
        page-break-inside: avoid;
        margin: 0;
        padding: 0;
    }

    .photo-upload-container {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
    }

    .custom-preview-container {
        width: 70px;
        height: 70px;
        border: 1px solid #2d0590;
        margin-left: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #preview {
        width: 70%;
        height: 70%;
        object-fit: cover;
    }

    .print-button, button[type="submit"] {
        display: none;
    }

    input, label {
        margin: 0;
        padding: 0;
    }

    input[type="text"], input[type="email"], input[type="file"] {
        width: auto;
        max-width: 100%;
    }

    .form-group {
        margin: 0 2px;
        margin-bottom: 5px;
    }

    .form-buttons {
        margin-top: 5px;
    }
}

.custom-upload {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border-radius: 5px;
}

.custom-upload:hover {
    background-color: #45a049;
}

input[type="file"] {
    display: none;
}
