/* General Body Styles */
body {
    font-family: 'Arial', sans-serif; /* Still recommend replacing with a nicer font from Google Fonts like 'Cairo' or 'Amiri' for Arabic */
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #2d2e2e, #25dae7); /* Dark grey to vibrant cyan */
    color: #f0f0f0; /* Lighter text color for dark background for better contrast */
    direction: rtl; /* For Arabic content */
    text-align: right;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2d2e2e, #25dae7); /* Match body background for continuity */
    padding: 20px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px); /* Frosted glass effect for header */
}

header h1 {
    margin: 0;
    color: #741f50; /* Deep rosy-purple for heading */
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* Stronger text shadow */
}

header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

header button {
    background-color: #741f50; /* Deep rosy-purple for header buttons */
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); /* Stronger shadow */
}

header button:hover {
    background-color: #5b193e; /* Darker rosy-purple on hover */
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Section Styles */
.section1 {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px); /* Adjust height based on header */
    box-sizing: border-box;
    /* Removed opacity/transform/animation here as card animation is controlled by JS */
}

/* Card Styles (Forms) */
.card {
    background-color: #a09f9f75; /* Semi-transparent grey for card background */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
    width: 100%;
    max-width: 500px;
    text-align: center;
    backdrop-filter: blur(3px); /* Slight blur for the card background */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle white border */

    /* Initial state for scroll animation */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Smooth transition for appearance */
}

/* Class added by JavaScript when card is in view */
.card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card h1 {
    color: #741f50; /* Deep rosy-purple for card headings */
    margin-bottom: 30px;
    font-size: 2.2em; /* Slightly larger heading */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.card input[type="text"],
.card input[type="file"] {
    width: calc(100% - 20px);
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #505050; /* Darker border for inputs */
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent input background */
    color: #f0f0f0; /* Light text color for inputs */
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.card input[type="text"]::placeholder { /* Placeholder color */
    color: #bbb;
}

.card input[type="text"]:focus,
.card input[type="file"]:focus {
    border-color: #741f50; /* Deep rosy-purple for focus border */
    box-shadow: 0 0 10px rgba(116, 31, 80, 0.6); /* Matching shadow */
    background-color: rgba(255, 255, 255, 0.15); /* Slightly brighter on focus */
    outline: none;
}

.card button {
    background-color: #741f50; /* Deep rosy-purple for form buttons */
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    letter-spacing: 0.5px; /* Slight letter spacing */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* Stronger shadow */
}

.card button:hover {
    background-color: #5b193e; /* Darker rosy-purple on hover */
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* Input File Styling */
input[type="file"] {
    cursor: pointer;
    /* Hide default file input button */
    color: transparent;
    position: relative;
}

input[type="file"]::before {
    content: 'اختر صورة';
    display: inline-block;
    background: #25dae7; /* Vibrant cyan for file input button */
    color: #2d2e2e; /* Dark text on vibrant button */
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

input[type="file"]:hover::before {
    background: #1eacc9; /* Darker cyan on hover */
    color: #fff; /* White text on darker cyan */
}

/* Animations */
/* The fadeInSlideUp and popIn animations are now conceptually replaced by the .card.is-visible transition logic */
/* However, if you have other elements where you want an initial page load animation, keep them. */
/* For 'card' elements, their initial visibility and animation are controlled by JS and the .is-visible class. */


/* Flower and Sweet Animations (Conceptual - requires more HTML structure for specific items) */

/* Example: A simple floating animation for decorative elements */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* To apply flower/sweet animations, you'd need elements like:
   <div class="flower-icon"></div> or <img src="sweet.png" class="sweet-icon">
   Then apply CSS:
.flower-icon {
    position: absolute;
    animation: float 4s ease-in-out infinite;
    z-index: -1;
    opacity: 0.7;
}

.sweet-icon {
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
    opacity: 0.9;
}
*/

/* Media Queries for responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px 20px;
    }

    header h1 {
        font-size: 2em;
        margin-bottom: 15px;
    }

    header ul {
        flex-direction: column;
        gap: 10px;
    }

    header button {
        width: 100%;
        padding: 10px;
    }

    .section1 {
        padding: 40px 15px;
    }

    .card {
        padding: 30px;
    }

    .card h1 {
        font-size: 1.8em;
    }

    .card input[type="text"],
    .card input[type="file"] {
        padding: 10px;
    }

    .card button {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}