@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400..800&display=swap');
* {
    font-family: "Baloo Bhaijaan 2", sans-serif;
    background-color: rgb(240, 248, 255);
    color: rgb(75, 115, 170);
}
h1 {
    direction: rtl;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
}
h4 {
    direction: rtl;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
}
.card-container {
    perspective: 1000px; /* مهم عشان يظهر تأثير 3D */
    max-width: 65vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    direction: unset;
    margin: 0 auto;
}

/* نخفي الـ checkbox */
.flip-checkbox {
    display: none;
}

.card1 {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    direction: rtl;
    text-align: right;
    justify-content: center;
    align-items: center;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    border: 4px solid rgb(75, 115, 170);
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 15px 24px 10px rgba(0, 0, 0, 0.1);
    min-height: 600px; /* بس عشان الشكل */
}

/* لما ينضغط اللابل ويرتبط بالـ checkbox */
.flip-checkbox:checked + .card1 {
    transform: rotateY(180deg);
}

/* الوجهين */
.card-front,
.card-back {
    position: absolute;
    justify-content: center;
    text-align: center;
    align-items: center;
    box-sizing: border-box;
    backface-visibility: hidden;
    border-radius: 15px;
}

/* الوجه الأمامي */
.card-front {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    

}

/* الوجه الخلفي */
.card-back {
     display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background-color: rgb(75, 115, 170);
    color: rgb(240, 248, 255);
    transform: rotateY(180deg);
    box-shadow: 15px 24px 10px rgba(0, 0, 0, 0.1);

  
}
.card-back > ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    background-color: rgb(75, 115, 170);
    color: rgb(240, 248, 255);
   
}

.card-back > ul > li {
    margin: 5px 0;
    background-color: transparent;
     padding: 2px;
     border: 2px solid rgb(240, 248, 255);
     color: rgb(240, 248, 255);
    border-radius: 10px;
    list-style: none;
     box-shadow: 15px 24px 10px rgba(0, 0, 0, 0.1);
}
.card-back > ul > li:hover {
  transform: translateY(-10px);
}
.card-back > ul > li > a {
     display: flex;
    flex-wrap: nowrap;
     background-color: transparent;
    color: rgb(240, 248, 255);
    justify-content: center;
    align-items: flex-end;
    text-decoration: none;
   
}

.card-back > p {
    margin-left: 5px;
    margin-right: 5px;
    color: rgb(240, 248, 255);
    background-color: transparent;
    
}

/* الفورم */
form {
    direction: rtl;
    display: flex;
    flex-direction: column;
}

input, textarea {
    direction: rtl;
    border: 2px solid rgb(75, 115, 170);
    border-radius: 5px;
    font-size: 0.9em;
    box-sizing: border-box;
    margin-bottom: 10px;
    margin-top: 0;

}

label {
    direction: rtl;
    text-align: right;
    font-weight: bold;
    margin: 0;
}

/* الأزرار */
button,.flip-button {
    background-color: rgb(75, 115, 170);
    color: rgb(240, 248, 255);
    padding: 5px 5px;
    border: 2px solid rgb(240, 248, 255);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: background-color 0.5s ease, color 0.5s ease, border 0.5s ease;
    text-decoration: none;
}

/* flip-button هو label بس شكله زر */
.flip-button {
    display: inline-flex;
    justify-content: center;
    align-items: flex-end;
}

button:hover,
.flip-button:hover {
    background-color: rgb(240, 248, 255);
    color: rgb(75, 115, 170);
    border: 2px solid rgb(75, 115, 170);
}

img {
    display: block;
    margin: 20px auto;
    max-width: 100px;
    height: auto;
    object-fit: cover;
    border: px solid rgb(75, 115, 170);
    border-radius: 50%;
}
.card-back > img {
background-color: transparent;
   display: block;
   object-fit: cover;
   border-radius: 10%;
   filter: grayscale(100%);
}
.card-back > ul > li > img {
    background-color: transparent;
   display: block;
   object-fit: cover;
   border-radius: 10%;
   filter: grayscale(100%);
}