/* ============================================================
   PAGE: REG - صفحة التسجيل (المعدلة)
   ============================================================ */

.container {
    max-width: 760px; /* تقليل العرض الأقصى عشان ما يبقاش عريض جداً */
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Reg Hero Wrapper (للتحكم في المسافات) ===== */
.reg-hero-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Reg Hero (مع مسافات منفصلة) ===== */
.reg-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a437c 100%);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    margin-top: 32px; /* مسافة منفصلة عن الهيدر */
    margin-bottom: 16px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow-md);
    direction: rtl;
}
.reg-hero h1 {
    font-family: var(--font-english);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2px;
}
.reg-hero h1 .kid {
    color: #ffffff;
}
.reg-hero h1 .eg {
    color: var(--secondary-color);
}
.reg-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin: 0;
}

/* ===== البطاقة الرئيسية ===== */
.section-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(34, 85, 159, 0.04);
    transition: all 0.3s ease;
}
.section-card:hover {
    box-shadow: var(--shadow-md);
}

.section-subtitle {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.hint-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.section-divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 32px 0;
}

/* ===== Form Row ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Notes ===== */
.notes-container {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    background: var(--bg-body);
}
.notes-list {
    list-style: none;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}
.notes-list li {
    background: var(--bg-white);
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}
.note-text {
    flex: 1;
    font-size: 0.95rem;
    word-break: break-word;
}
.delete-note {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--danger-color);
    transition: 0.2s;
}
.delete-note:hover {
    background: #fee2e2;
}

.add-note {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.add-note input {
    flex: 1;
    min-width: 160px;
}
.btn-add {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
    font-family: var(--font-arabic);
}
.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== Payment Box ===== */
.manual-payment-box {
    background: #f8faff;
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-top: 16px;
}
.manual-payment-box h4 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 6px;
}
.manual-payment-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.static-account {
    background: var(--bg-white);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 18px;
}
.static-account strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}
.copy-small-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
    font-family: var(--font-arabic);
}
.copy-small-btn:hover {
    background: var(--secondary-dark);
}

/* ===== Submit Button ===== */
.submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-arabic);
    box-shadow: var(--shadow-sm);
    margin-top: 10px;
}
.submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Result Box ===== */
.result-box {
    background: #e8f5ee;
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-top: 24px;
    text-align: center;
    display: none;
    word-break: break-word;
}
.result-box.show {
    display: block;
}
.result-box.error {
    background: #fee2e2;
    border-color: var(--danger-color);
}
.result-box .child-link-result {
    background: var(--bg-white);
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    word-break: break-all;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* ===== Price & Offers ===== */
.offer-notice {
    background: #fef3c7;
    border: 1px solid var(--warning-color);
    color: #92400e;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    font-weight: 600;
    display: none;
}
.offer-notice.show {
    display: block;
}
.free-notice {
    background: #dbeafe;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    font-weight: 700;
    display: none;
}
.free-notice.show {
    display: block;
}
.price-display {
    background: #e8f5ee;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-dark);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    font-weight: 700;
}

/* ===== Modal ===== */
.modal-dialog {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-dialog h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.modal-dialog .info-item {
    font-size: 1.1rem;
    margin: 8px 0;
}
.whatsapp-modal-btn {
    background: #25D366;
    color: white !important;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s ease;
}
.whatsapp-modal-btn:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* ============================================================
   MEDIA QUERIES (محسنة)
   ============================================================ */

/* شاشات متوسطة (تابلت) */
@media (max-width: 992px) {
    .reg-hero-wrapper {
        padding: 0 16px;
    }
    .reg-hero {
        padding: 24px 28px;
        margin-top: 28px;
        border-radius: var(--radius-md);
    }
    .reg-hero h1 {
        font-size: 2.2rem;
    }
    .section-card {
        padding: 28px 24px;
    }
    .container {
        padding: 0 16px;
    }
}

/* شاشات صغيرة (موبايل) */
@media (max-width: 768px) {
    .reg-hero-wrapper {
        padding: 0 12px;
    }
    .reg-hero {
        padding: 20px 18px;
        margin-top: 40px; /* مسافة كبيرة عشان تنفصل عن الهيدر */
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }
    .reg-hero h1 {
        font-size: 1.8rem;
    }
    .reg-hero p {
        font-size: 1rem;
    }

    .section-card {
        padding: 20px 16px;
        border-radius: var(--radius-md);
    }
    .section-subtitle {
        font-size: 1.3rem;
    }
    .container {
        padding: 0 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .image-preview {
        width: 120px;
        height: 120px;
    }

    .manual-payment-box {
        padding: 18px 16px;
    }
    .static-account {
        flex-direction: column;
        text-align: center;
    }

    .submit-btn {
        font-size: 1.1rem;
        padding: 16px;
    }

    .add-note {
        flex-direction: column;
    }
    .btn-add {
        width: 100%;
        justify-content: center;
    }

    .modal-dialog {
        padding: 24px 20px;
    }
    .modal-dialog h2 {
        font-size: 1.5rem;
    }
}

/* شاشات صغيرة جداً (هواتف صغيرة) */
@media (max-width: 480px) {
    .reg-hero-wrapper {
        padding: 0 8px;
    }
    .reg-hero {
        padding: 16px 14px;
        margin-top: 44px; /* أقصى مسافة عشان تنفصل بشكل واضح */
        margin-bottom: 10px;
        border-radius: var(--radius-sm);
    }
    .reg-hero h1 {
        font-size: 1.5rem;
    }
    .reg-hero p {
        font-size: 0.9rem;
    }

    .section-card {
        padding: 16px 12px;
        border-radius: var(--radius-sm);
    }
    .container {
        padding: 0 8px;
    }

    .checkbox-group label {
        font-size: 0.85rem;
    }

    .static-account strong {
        font-size: 1rem;
    }

    .submit-btn {
        font-size: 1rem;
        padding: 14px;
    }

    /* منع التكبير التلقائي للحقول في iOS */
    input, select, textarea {
        font-size: 16px;
    }
}

/* رسائل الخطأ المحسنة */
.error-message.show {
    font-size: 0.95rem;
    padding: 10px 14px;
    background: #fee2e2;
    border-radius: 12px;
    border-right: 4px solid #e63946;
    color: #991b1b;
    font-weight: 600;
}

.result-box.error {
    background: #fee2e2;
    border-color: #e63946;
    padding: 20px;
    border-radius: 16px;
}

.result-box.error #resultMessage {
    font-size: 1rem;
    line-height: 1.8;
    color: #1a1a2e;
}

.result-box.error #resultMessage a {
    color: #22559f;
    font-weight: 700;
    text-decoration: underline;
}

/* ============================================================
   أزرار مودال النجاح (الجديدة)
   ============================================================ */

.modal-dialog .modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.modal-dialog .modal-actions a,
.modal-dialog #modalButtons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-arabic);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 52px;
    flex: 1;
    min-width: 140px;
    border: none;
    cursor: pointer;
}

/* زر واتساب */
.modal-dialog .whatsapp-modal-btn {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}
.modal-dialog .whatsapp-modal-btn:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

/* زر تسجيل طفل جديد */
.modal-dialog .modal-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 85, 159, 0.2);
}
.modal-dialog .modal-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 85, 159, 0.3);
}

/* زر الرئيسية */
.modal-dialog .modal-btn-secondary {
    background: var(--bg-body);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}
.modal-dialog .modal-btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* ===== تنسيق الموبايل ===== */
@media (max-width: 768px) {
    .modal-dialog .modal-actions a,
    .modal-dialog #modalButtons a {
        min-width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .modal-dialog .modal-actions a,
    .modal-dialog #modalButtons a {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 44px;
        border-radius: var(--radius-md);
    }
}