/* ألوان زاهية وجذابة للأطفال */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #4CAF50;
    --accent-color: #FFE66D;
    --text-color: #292F36;
    --light-bg: #F7FFF7;
    --error-color: #FF6B6B;
    --success-color: #4ECDC4;
}

/* تنسيق عام للصفحة */
body {
    font-family: 'Comic Sans MS', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.page-layout {
    display: flex;
    min-height: 100vh;
    gap: 2rem;
}

/* القسم العلوي - Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 5%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.wave-divider .shape-fill {
    fill: var(--light-bg);
}

/*=================================================================================*/
/* قسم النموذج */
.form-section {
    flex: 1;
    min-width: 500px;
    max-width: 600px;
    padding: 2rem;
    background-color: white;
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* === القسم الإعلاني - تم التكبير === */
.ad-section {
    flex: 1;
    background: linear-gradient(135deg, #d2f8d2, #b6eeb6);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* تغيير من center إلى flex-start */
    border-radius: 30px;
    margin: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
}

.ad-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.ad-title {
    color:#4CAF50;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.ad-subtitle {
    color: #4CAF50;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.ad-products-grid {
    display: flex;
    flex-direction: column; /* تغيير من grid إلى flex عمودي */
    gap: 3rem;
    width: 100%;
    max-width: 600px; /* تقليل العرض لعمود واحد */
    align-items: center;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 3rem 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.4s ease;
    text-align: center;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.product-card img {
    width: 100%;
    max-width: 300px !important;
    min-width: 250px;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 20px;
    transition: all 0.4s ease;
    object-fit: contain;
}

.product-card:hover img {
    transform: scale(1.15) rotate(5deg);
}

.product-card h4 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.product-card p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* تأثيرات متحركة للصور - تكبير */
.animated-logo {
    animation: float 3s ease-in-out infinite;
    max-width: 320px !important;
    min-width: 280px;
}

.floating-wizard {
    animation: bounce 2.5s ease-in-out infinite;
    max-width: 300px !important;
    min-width: 260px;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    50% { 
        transform: translateY(-15px) rotate(8deg) scale(1.05); 
    }
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-20px) scale(1.1); 
    }
}

/* تحسينات إضافية للصور لضمان الحجم الكبير */
.product-card img {
    width: auto !important;
    height: auto !important;
    max-height: 280px !important;
}

/* التأكد من أن الصور لا تتأثر بأي تنسيقات أخرى */
.ad-section img,
.product-card img,
.animated-logo,
.floating-wizard {
    max-width: 300px !important;
    width: auto !important;
    height: auto !important;
}

/* تحسينات للشاشات الكبيرة جداً */
@media (min-width: 1400px) {
    .ad-products-grid {
        max-width: 700px;
    }
    
    .product-card {
        max-width: 600px;
        min-height: 450px;
    }
    
    .product-card img {
        max-width: 350px !important;
    }
    
    .animated-logo {
        max-width: 380px !important;
    }
    
    .floating-wizard {
        max-width: 340px !important;
    }
}

/* تحسينات للشاشات المتوسطة */
@media (max-width: 1200px) {
    .ad-section {
        padding: 3rem 2rem;
        min-height: 70vh;
    }
    
    .ad-title {
        font-size: 2.5rem;
    }
    
    .ad-products-grid {
        max-width: 500px;
        gap: 2.5rem;
    }
    
    .product-card {
        min-height: 380px;
        padding: 2.5rem 2rem;
        max-width: 450px;
    }
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .ad-section {
        padding: 2rem 1.5rem;
        min-height: auto;
        margin: 1rem;
        border-radius: 20px;
    }
    
    .ad-title {
        font-size: 2rem;
    }
    
    .ad-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
    }
    
    .ad-products-grid {
        gap: 2rem;
        max-width: 400px;
    }
    
    .product-card {
        min-height: 350px;
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .product-card img {
        max-width: 220px !important;
        min-width: 200px;
    }
    
    .animated-logo {
        max-width: 240px !important;
    }
    
    .floating-wizard {
        max-width: 220px !important;
    }
    
    .product-card h4 {
        font-size: 1.6rem;
    }
    
    .product-card p {
        font-size: 1.1rem;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .ad-section {
        padding: 1.5rem 1rem;
    }
    
    .ad-title {
        font-size: 1.8rem;
    }
    
    .ad-products-grid {
        max-width: 100%;
        gap: 1.5rem;
    }
    
    .product-card {
        padding: 1.5rem 1rem;
        min-height: 300px;
    }
    
    .product-card img {
        max-width: 180px !important;
        min-width: 160px;
    }
    
    .animated-logo {
        max-width: 200px !important;
    }
    
    .floating-wizard {
        max-width: 180px !important;
    }
}

/* تحسينات التمرير إذا كان المحتوى طويلاً */
.ad-section {
    overflow-y: auto; /* إضافة شريط تمرير إذا لزم الأمر */
}

.ad-products-grid {
    padding-bottom: 2rem; /* مساحة إضافية في الأسفل */
}
/*=================================================================================*/
/* تنسيقات النموذج */
.signup-container {
    width: 100%;
    padding: 2rem;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

h2 {
    color: var(--primary-color);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* تنسيقات حقول الإدخال */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-row .input-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    background-color: white;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/*=================================================================================*/
/* تنسيق زر التقديم */
.submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.submit-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:active {
    transform: translateY(0);
}

/*=================================================================================*/
/* تنسيقات رفع الصورة */
.upload-group {
    border: 2px dashed var(--secondary-color);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    background-color: #f9f9f9;
}

.upload-group label {
    display: inline-block;
    margin-bottom: 1rem;
    cursor: pointer;
}

.upload-group input[type="file"] {
    display: none;
}

.upload-group::before {
    content: "📷";
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* تنسيقات رسائل التحميل */
.upload-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none;
}

.upload-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    display: block;
}

.upload-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    display: block;
}

.upload-message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    display: block;
}

/* تنسيقات رسائل الخطأ والنجاح */
.error-message {
    color: var(--error-color);
    background-color: #ffebee;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--error-color);
    font-weight: bold;
}

.success-message {
    color: var(--success-color);
    background-color: #e8f5e9;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--success-color);
    font-weight: bold;
}


        .error-message {
            color: #d32f2f;
            font-size: 14px;
            margin-top: 5px;
            text-align: right;
        }
        .input-group.error input, .input-group.error select, .input-group.error textarea {
            border: 2px solid #d32f2f !important;
        }
        .input-group.error label { color: #d32f2f; }
        .general-error {
            background: #ffebee;
            color: #c62828;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 20px;
            border: 1px solid #ef9a9a;
        }
        /* تنسيقات إضافية للتقويم */
        .flatpickr-calendar {
            font-size: 16px !important;
            width: 320px !important;
        }
        .flatpickr-day {
            height: 40px !important;
            line-height: 40px !important;
            font-size: 16px !important;
        }
        .flatpickr-month {
            height: 50px !important;
        }
        .flatpickr-current-month {
            font-size: 18px !important;
        }
        /* تنسيقات التسمية المزدوجة */
        .label-with-english {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .english-label {
            font-size: 12px;
            color: #666;
            font-style: italic;
        }
        .required-field::after {
            content: " *";
            color: #d32f2f;
        }
        /* تنسيقات لحقول ولي الأمر */
        .guardian-field {
            transition: all 0.3s ease;
        }
   

/*=================================================================================*/
/* تنسيق رابط تسجيل الدخول */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.login-link a:hover {
    text-decoration: underline;
}

/* تأثيرات خاصة للأطفال */
input,
select,
textarea {
    font-family: 'Comic Sans MS', cursive;
}

input::placeholder {
    color: #aaa;
    font-style: italic;
}

/* رسومات زخرفية */
.signup-container::before {
    content: "✏️";
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 2rem;
    transform: rotate(-15deg);
}

.signup-container::after {
    content: "🎨";
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 2rem;
    transform: rotate(15deg);
}

/* تصميم متجاوب */
@media (max-width: 1024px) {
    .page-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-section {
        min-width: auto;
        max-width: 100%;
        margin: 1rem;
    }
    
    .ad-section {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .ad-title {
        font-size: 2rem;
    }
    
    .ad-products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-layout {
        flex-direction: column;
    }

    .form-section {
        border-right: none;
        border-bottom: 3px dashed var(--secondary-color);
        margin: 1rem;
    }

    .ad-section {
        padding: 1.5rem 1rem;
        margin: 1rem;
    }

    .ad-title {
        font-size: 1.8rem;
    }

    .ad-subtitle {
        font-size: 1.1rem;
    }

    .signup-container {
        padding: 1.5rem;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    .product-card img {
        max-width: 150px;
    }
}

/* تأثيرات حركية */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.submit-button:hover {
    animation: bounce 0.5s;
}

/* تحسينات إضافية للصور */
.product-card img.animated-logo {
    max-width: 180px;
    height: auto;
}

.product-card img.floating-wizard {
    max-width: 160px;
    height: auto;
}