/* ============================================
   Bible Refsam - الأنماط المتقدمة v10.0
   ============================================ */

.bib-header-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px 15px 10px;
    background-color: transparent;
    width: 100%;
}

.bib-container {
    margin: 25px 0;
    direction: rtl;
    text-align: center;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    width: 100%;
}

/* صندوق الآية المرن */
.bib-verse-box {
    background: var(--bib-bg-color, #ffffff);
    border-right: 5px solid var(--bib-border-color, #8e44ad);
    border-radius: 12px;
    padding: 22px 28px 18px 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
    display: inline-block;
    text-align: right;
    box-sizing: border-box;
}

.bib-verse-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* زر الزوادة الروحية المجسم */
.bib-badge {
    position: absolute;
    top: -14px;
    right: 25px;
    background: var(--bib-badge-bg, #8e44ad);
    color: var(--bib-badge-color, #ffffff);
    font-size: var(--bib-badge-size, 13px);
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    z-index: 2;
    user-select: none;
}

.bib-verse-box:hover .bib-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* علامة التنصيص الزخرفية */
.bib-verse-box::before {
    content: '\201D';
    font-size: 80px;
    color: var(--bib-border-color, #8e44ad);
    opacity: 0.08;
    position: absolute;
    top: -20px;
    right: 15px;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

/* نص الآية */
.bib-text {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-size: var(--bib-text-size, 22px);
    line-height: 1.7;
    color: var(--bib-text-color, #1a252f);
    font-weight: 500;
    display: inline;
}

/* المرجع / المصدر بجانب النص */
.bib-reference {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-size: var(--bib-ref-size, 15px);
    color: var(--bib-ref-color, #8e44ad);
    font-weight: 700;
    margin-right: 12px;
    white-space: nowrap;
    display: inline-block;
    opacity: 0.95;
}

.bib-error {
    font-family: 'Tajawal', sans-serif;
    color: #e74c3c;
    font-size: 15px;
    text-align: center;
    padding: 12px;
    background: #fadbd8;
    border-radius: 6px;
    border-right: 4px solid #e74c3c;
    margin: 0 auto;
    max-width: 600px;
}

@media (max-width: 768px) {
    .bib-verse-box {
        padding: 20px 18px 15px 15px;
        text-align: center;
    }
    
    .bib-badge {
        right: 50%;
        transform: translateX(50%);
    }

    .bib-verse-box:hover .bib-badge {
        transform: translateX(50%) scale(1.05);
    }

    .bib-text {
        font-size: calc(var(--bib-text-size, 22px) * 0.85);
        line-height: 1.6;
    }

    .bib-reference {
        font-size: calc(var(--bib-ref-size, 15px) * 0.9);
        display: block;
        margin-right: 0;
        margin-top: 8px;
    }
}