#modalHero .modal {
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}

#modalHero .modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

#modalHero .modal-foot {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    position: static !important;
    flex-shrink: 0 !important;
    padding: 14px 20px !important;
    border-top: 1px solid var(--border-soft) !important;
    background: #fff !important;
}
.stats-modal-card {
    width: 640px !important;
    max-width: 90vw !important;
    height:450px;
}

.page-settings-modal {
    height: 60vh;
}
#modalPageSettings > .modal {
    position: relative;
    width: 1000px;
    max-width: 85vw;
    height: auto;
    display: flex;
    flex-direction: column;
    top: auto;
    left: auto;
}
#modalPageSettings .field {
    margin-bottom: 8px;
}

    #modalPageSettings .field label {
        margin-bottom: 4px;
    }

#modalPageSettings .modal-body {
    padding: 20px;
}

#modalHero > .modal {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    width: min(1000px, 90vw); /* أو المقاس المناسب */
    max-height: 90vh;
    height: auto;
}

.modal-centered > .modal {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    width: min(1000px, 90vw);
    max-height: 90vh;
    height: auto;
}

.hero-slide-modal {
    width: min(900px, 90vw);
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    left: auto;
    top: auto;
    margin: 0;
    transform: none;
}

.hero-delete-modal {
    width: 520px;
    max-width: 90vw;
    position: relative;
    left: auto;
    top: auto;
    margin: 0;
    transform: none;
}
/*.hero-modal {
    display: grid !important;
    place-items: center;
}*/





/* =========================
   DNA Items
   ========================= */

.dna-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
    background: #fff;
}

    .dna-item:last-child {
        margin-bottom: 12px;
    }


/* Header */

.dna-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dna-item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}


/* Language rows */

.dna-language-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.dna-field {
    flex: 1;
    min-width: 0;
}

    .dna-field label {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        font-weight: 600;
        color: var(--muted);
    }

        .dna-field label span {
            margin-left: 4px;
            padding: 2px 6px;
            border-radius: 4px;
            background: var(--blue-100);
            color: var(--blue);
            font-size: 10px;
            font-weight: 700;
        }

.dna-ar {
    text-align: right;
}


/* Image */

.dna-image-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.dna-image-info {
    flex: 1;
}

.dna-image-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.dna-image-hint {
    margin-top: 3px;
    font-size: 11px;
    color: var(--muted);
}

.dna-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

    .dna-upload-btn:hover {
        background: var(--gray-50);
    }


/* Image preview */

.dna-image-preview {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--gray-50);
}

    .dna-image-preview img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 7px;
    }

.dna-item + .dna-item {
    position: relative;
    margin-top: 24px;
}

    .dna-item + .dna-item::before {
        content: "";
        position: absolute;
        top: -13px;
        left: 0;
        right: 0;
        border-top: 1px solid var(--border);
    }


/* =========================================
   DNA Modal
   ========================================= */

#modalDNA .dna-row {
    position: relative;
    padding: 24px 20px 20px;
    margin-bottom: 16px;
    border: 2px solid #b8c4d8;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

    /* Strong separator between DNA cards */
    #modalDNA .dna-row + .dna-row {
        margin-top: 16px;
    }

/* EN / AR rows */
#modalDNA .dna-fields-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 14px;
}

    /* Fields */
    #modalDNA .dna-fields-row .field {
        min-width: 0;
    }

        #modalDNA .dna-fields-row .field label {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 7px;
            font-size: 13px;
            font-weight: 700;
            color: #1f2937;
        }

#modalDNA .required {
    color: #dc2626;
    font-weight: 700;
}

/* Arabic badge */
#modalDNA .lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    border-radius: 5px;
    background: #dbe7ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
}

/* Inputs */
#modalDNA .dna-fields-row .inp {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
}

/* Image section */
#modalDNA .dna-image-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px dashed #b8c4d8;
}

/* Image text */
#modalDNA .dna-image-info label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

#modalDNA .dna-image-hint {
    font-size: 12px;
    color: #8a94a6;
}

/* Upload + preview */
#modalDNA .dna-image-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

#modalDNA .dna-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

/* Preview container */
#modalDNA .dna-image-preview {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

/* Preview image */
#modalDNA .dna-preview-img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover;
    border-radius: 6px;
}

/* Delete button */


#modalDNA .remove-dna {
    position: absolute;
    top: 18px;
    inset-inline-end: 14px;
    color: #6b7280;
}

    #modalDNA .remove-dna:hover {
        color: #dc2626;
    }

/* Add button */
#modalDNA .dna-add-btn {
    margin-top: 2px;
    margin-bottom: 4px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 700px) {

    #modalDNA .dna-fields-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #modalDNA .dna-image-row {
        align-items: flex-start;
        flex-direction: column;
    }

    #modalDNA .dna-image-actions {
        width: 100%;
    }
}

.journey-item {
    position: relative;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
}

    .journey-item:not(:first-child) {
        margin-top: 16px;
    }

.journey-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

    .journey-fields-row .field {
        min-width: 0;
    }

.journey-item label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 7px;
    border-radius: 6px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.journey-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

    .journey-item-actions .icon-btn {
        color: #64748b;
    }

        .journey-item-actions .icon-btn:hover {
            color: #dc2626;
        }

@media (max-width: 768px) {
    .journey-fields-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}



/* =========================
   Curriculum Overview Items
   ========================= */

#curriculumContainer {
    width: 100%;
}

.curriculum-item {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
    background: #fff;
    position: relative;
}

    .curriculum-item + .curriculum-item {
        margin-top: 14px !important;
    }


/* Item header */

.curriculum-item-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #d9dee7;
}

.curriculum-item-number {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}


/* Language rows */

.curriculum-language-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 14px !important;
}

    .curriculum-language-row:last-child {
        margin-bottom: 0 !important;
    }


/* Fields */

.curriculum-field {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

    .curriculum-field label {
        display: block !important;
        margin-bottom: 7px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    .curriculum-field .inp {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }


    /* Arabic */

    .curriculum-field input[dir="rtl"] {
        text-align: right;
    }


/* Add button */

#btnAddCurriculum {
    margin-top: 2px;
}


/* Mobile */

@media (max-width: 768px) {

    .curriculum-language-row {
        grid-template-columns: 1fr !important;
    }
}



.required {
    color: #dc2626;
    margin-inline-start: 2px;
}



/* =========================
   Curriculum Image
   ========================= */

.curriculum-image-field {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 2px dashed #cbd5e1 !important;
    gap: 20px !important;
    box-sizing: border-box;
}

.curriculum-image-info {
    flex: 1;
    min-width: 0;
}

    .curriculum-image-info label {
        display: block !important;
        margin: 0 0 5px 0 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    .curriculum-image-info .required {
        color: #dc2626 !important;
    }

    .curriculum-image-info .cell-sub {
        font-size: 12px;
        color: #94a3b8;
    }


/* Upload button */

.curriculum-upload-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    min-width: 145px;
    cursor: pointer !important;
}


/* Image preview */

.curriculum-image-preview {
    width: 64px !important;
    height: 64px !important;
    flex: 0 0 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
}

    .curriculum-image-preview img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }





