/* ═══════════════════════════════════════
   PROJECT PAGE — project-00.css
   أُعيدت بنيته ليطابق التصميم المعتمَد (2026-06-30)
═══════════════════════════════════════ */

/* ── التخطيط: 3 أعمدة RTL — صورة (يمين) | بطاقة النموذج (وسط) | بطاقة الألسنة (يسار) ── */
.project-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
}

.proj-back-row { padding-top: 20px; margin-bottom: -8px; }

.project-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding: 28px 0;
}
@media (max-width: 991px) {
    .project-layout { flex-direction: column !important; }
}

.project-images-container {
    flex: 0 0 520px;
    width: 520px;
    order: -1; /* يظهر يمين الصفحة في RTL */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-info-container {
    flex: 0 0 520px;
    width: 520px;
    min-width: 0;
    background: #fff;
    border: 1px solid #efe9eb;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 4px 22px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
}

.project-tabs-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .project-images-container,
    .project-info-container,
    .project-tabs-container { flex: unset; width: 100%; order: 0; }
    /* على الجوال البطاقة بارتفاع محتواها (لا تمدّد) فنحتاج gap لمنع تلاصق العناصر */
    .project-info-container { gap: 12px; }
}

/* ═══════════════════════════════════════
   Image Carousel
═══════════════════════════════════════ */
.proj-carousel {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #f3f4f6;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.proj-slide {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    transition: opacity .55s ease !important;
}
.proj-slide.active { opacity: 1 !important; }
.proj-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Arrows */
.proj-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.42);
    border: none;
    color: #fff;
    font-size: 26px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}
.proj-arrow:hover { background: rgba(0,0,0,.7); }
.proj-prev { right: 10px; }
.proj-next { left: 10px; }

/* Thumbnails */
.proj-thumbs {
    display: flex;
    gap: 8px;
    padding-bottom: 2px;
}
.proj-thumb {
    flex: 1 1 0;
    min-width: 0;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: .6;
    transition: border-color .2s, opacity .2s;
}
.proj-thumb.active { border-color: #5a1932; opacity: 1; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Share buttons */
.share-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 15px;
    text-decoration: none;
    background: #f3e3e9;
    color: #5a1932;
    transition: transform .2s, background .2s, color .2s;
}
.share-btn:hover { transform: scale(1.12); background: #5a1932; color: #fff; }
.share-fb, .share-ig, .share-wa { background: #f3e3e9; }

/* ═══════════════════════════════════════
   Info container — العنوان
═══════════════════════════════════════ */
.proj-title-area {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 14px;
    margin-bottom: 16px;
}
.proj-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; color: #1f2937; }
.proj-excerpt { font-size: 13px; color: #9ca3af; margin: 0; }

/* بطاقات المعلومات — صف من 4، أيقونة في دائرة مارون */
.infos {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
}
@media (max-width: 575px) {
    .infos { grid-template-columns: repeat(2, 1fr) !important; }
}
.info {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
    padding: 9px 6px !important;
    background: #faf6f7 !important;
    border: 1px solid #f1eaec !important;
    border-radius: 12px !important;
}
.info > div { display: flex; flex-direction: column; gap: 1px; }
.info-icon {
    color: #5a1932;
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}
.info-label { display: block; font-size: 10px; color: #9ca3af; font-weight: 600; line-height: 1.2; }
.info-val   { display: block; font-size: 13px; color: #1f2937; font-weight: 800; line-height: 1.3; }

/* ═══════════════════════════════════════
   شريط التقدم
═══════════════════════════════════════ */
.proj-progress-wrap { margin-bottom: 16px; }
.proj-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}
.proj-progress-title { font-size: 12px; color: #9ca3af; font-weight: 600; }
.proj-progress-pct   { font-size: 21px; font-weight: 800; color: #2e9e4f; }

.proj-progress-track {
    width: 100% !important;
    height: 16px !important;
    background-color: #e4f0e4 !important;
    border-radius: 99px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.08) !important;
}
.proj-progress-fill {
    height: 100% !important;
    width: 0;
    border-radius: 99px !important;
    background: linear-gradient(90deg, #2e7d32, #43a047, #66bb6a) !important;
    transition: width 1.3s cubic-bezier(.4,0,.2,1) !important;
    position: relative !important;
}
/* لمعة شريط التقدم */
.proj-progress-shine {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    overflow: hidden;
    pointer-events: none;
}
.proj-progress-shine::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    inset-inline-start: -50%;
    width: 35%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    transform: skewX(-20deg);
    animation: projShine 2.1s infinite;
}
@keyframes projShine {
    0%   { inset-inline-start: -50%; }
    60%  { inset-inline-start: 130%; }
    100% { inset-inline-start: 130%; }
}
.proj-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 13px;
    color: #6b7280;
}
.proj-progress-meta strong { color: #1f2937; font-size: 15px; font-weight: 800; }

/* ═══════════════════════════════════════
   نموذج التبرع — العدّاد
═══════════════════════════════════════ */
.donateamount {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border: 1px solid #e5e0e2 !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    margin-bottom: 12px !important;
    background: #fff !important;
}
.stepper-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid #5a1932;
    background: transparent;
    color: #5a1932;
    font-size: 18px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .18s, color .18s;
    line-height: 1; padding: 0;
}
.stepper-btn:hover { background: #5a1932; color: #fff; }
.stepper-btn:active { transform: scale(.93); }

.donateamount .amount-center {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.donateamount .amount-label { font-size: 10px; color: #9ca3af; font-weight: 600; margin-bottom: 1px; }
.donateamount .amount-center input {
    font-size: 24px !important;
    font-weight: 800 !important;
    width: 100% !important;
    height: 38px !important;
    text-align: center !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #1f2937 !important;
}
.donateamount .currency { font-weight: 700; font-size: 15px; color: #9ca3af; }

/* أزرار المبالغ السريعة — حبوب متساوية */
.donateamounts {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    margin-bottom: 16px !important;
}
.amount-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 7px 2px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    transition: all .18s !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}
.amount-btn.active {
    background-color: #5a1932 !important;
    color: #fff !important;
    border-color: #5a1932 !important;
}

/* زر التبرع الرئيسي */
.proj-donate-actions { display: flex; flex-direction: column; gap: 8px; }
.proj-donate-row1 { display: flex; gap: 8px; }

.proj-donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 14px;
    background: #5a1932;
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background .18s;
}
.proj-donate-btn:hover { background: #7a2545; color: #fff; }

/* زر السلة */
.proj-cart-btn {
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3d4e0;
    color: #5a1932;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: background .18s, color .18s;
}
.proj-cart-btn:hover { background: #5a1932; color: #fff; }
.proj-cart-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    inset-inline-end: 50%;
    transform: translateX(50%);
    background: #1f2937;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}
.proj-cart-btn[data-tooltip]:hover::after { opacity: 1; }

/* تبرع كامل */
.proj-donate-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px solid #5a1932;
    color: #5a1932;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.proj-donate-full:hover { background: #5a1932; color: #fff; }

/* مشاركة */
.proj-share { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.proj-share-label { font-size: 13px; font-weight: 600; color: #9ca3af; }

/* ═══════════════════════════════════════
   بطاقة الألسنة (العمود الأيسر)
═══════════════════════════════════════ */
.proj-tabs-card {
    flex: 1;
    background: #fff;
    border: 1px solid #efe9eb;
    border-radius: 20px;
    padding: 6px 22px 22px;
    box-shadow: 0 4px 22px rgba(0,0,0,.05);
    overflow-y: auto;
    /* بلا شريط تمرير — الإيحاء بالمحتوى الإضافي عبر تدرج سفلي */
    scrollbar-width: none;
}
.proj-tabs-card::-webkit-scrollbar { display: none; }

/* تدرج باهت أسفل البطاقة يوحي بوجود محتوى تحت، يختفي عند النهاية */
.project-tabs-container { position: relative; }
.project-tabs-container::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 1px;
    height: 64px;
    background: linear-gradient(to top, #fff 18%, rgba(255, 255, 255, 0));
    border-radius: 0 0 20px 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s;
}
.project-tabs-container.has-more::after { opacity: 1; }
.proj-tabs-nav {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.proj-tabs-nav::-webkit-scrollbar { display: none; }
.proj-tab-btn {
    background: none;
    border: none;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .18s, border-color .18s;
}
.proj-tab-btn:hover { color: #5a1932; }
.proj-tab-btn.active { color: #5a1932; border-bottom-color: #5a1932; }

.proj-tabs-body { min-height: 0; }
/* الحد الأدنى للارتفاع فقط عند وجود لسان مفتوح — البطاقة تبقى مطوية قبل الضغط */
.proj-tabs-card.tab-open .proj-tabs-body { min-height: 220px; }
.proj-tab-content { display: none; }
.proj-tab-content.active { display: block; animation: fadeTab .2s ease; }
@keyframes fadeTab { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

/* بطاقة المشروع صفحاتٍ متتابعة (مولَّدة من PDF) */
.proj-card-pages { display: flex; flex-direction: column; gap: 14px; }
.proj-card-pages img {
    width: 100%; height: auto; display: block;
    border: 1px solid #ececec; border-radius: 8px;
    background: #fafafa; /* حتى لا يومض الفراغ أبيضَ قبل تحميل الصفحة */
}

.tab-prose { font-size: 14px; line-height: 2; color: #374151; }
/* توحيد الخط مع خط الموقع — يتجاوز خطوط Word المضمنة في المحتوى الملصوق */
.tab-prose, .tab-prose * { font-family: inherit !important; }
.tab-prose p { margin-bottom: 10px; }
.tab-prose img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }

/* بطاقات التفاصيل */
.detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
}
.detail-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); transform: translateY(-2px); }
.detail-icon { font-size: 22px; color: #5a1932; margin-bottom: 6px; }
.detail-label { font-size: 11px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.detail-value { font-size: 14px; font-weight: 700; color: #1f2937; }

/* التحديثات */
.update-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    border-inline-end: 3px solid #5a1932;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* الوثائق */
.doc-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background .18s;
    font-size: 14px;
}
.doc-item:hover { background: #f3f4f6; color: #374151; }

/* زر التبرع الذهبي على الصورة */
.proj-img-donate {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #D69832;
    color: #fff;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    transition: background .18s, transform .12s;
}
.proj-img-donate:hover { background: #c08524; color: #fff; }
.proj-img-donate:active { transform: scale(.97); }

/* توزيع عناصر نموذج الدفع بالتساوي على ارتفاع البطاقة:
   إلغاء الهوامش السفلية ليتكفّل space-between بالتوزيع،
   فيبقى المحتوى أقصر من الصورة (520) → الصورة تقود الارتفاع وتملأ عمودها */
.project-info-container > * { margin-bottom: 0 !important; }
