/* ========================================
   program-details.css
   تنسيقات خاصة بصفحة تفاصيل البرنامج/المنحة
   ======================================== */

/* البطاقات */
.details-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 18px;
}

/* صف عنوان القسم */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-title-row h2 {
    font-size: 19px;
    margin: 0;
    color: #112869;
    display: flex;
    gap: 12px;
    align-items: center;
}

.section-title-row i {
    color: var(--blue);
}

/* هيرو البرنامج */
.program-hero {
    min-height: 320px;
    background: center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 42px;
    position: relative;
}

.program-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 39, 106, .95) 0%, rgba(5, 39, 106, .82) 38%, rgba(5, 39, 106, .2) 72%);
}

.hero-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    background: #07327f;
    color: #fff;
    border-radius: 18px;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 28px;
}

.hero-logo {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 8px solid #fff;
}

.hero-info h1 {
    font-size: 42px;
    margin: 0 0 12px;
    color: #fff;
}

.hero-info p {
    font-size: 18px;
    color: #dfe9ff;
}

/* شارة ساخنة */
.ad-chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    color: var(--blue);
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 900;
}

.ad-chip i {
    color: #e8344c;
}

/* شريط التبويبات */
.tabbar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.tabbar a {
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #0b2a69;
    font-size: 17px;
    font-weight: 800;
    border-bottom: 3px solid transparent;
}

.tabbar a.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* بطاقات المعلومات */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px;
}

.info-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5ff;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-size: 21px;
}

.info-box small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.info-box strong {
    font-size: 17px;
}

/* العمودين */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* القائمة المصغرة */
.mini-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mini-list div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    font-weight: 800;
}

/* صف المفتاح والقيمة */
.kv-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding: 15px 0;
}

.kv-row:last-child {
    border-bottom: none;
}

/* محتوى النص */
.text-content {
    line-height: 1.85;
    color: #24376a;
}

/* شبكة المستندات */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.doc-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-item i {
    color: var(--blue);
    margin-right: 10px;
}

/* الأزرار السفلية */
.bottom-actions {
    position: sticky;
    bottom: 0;
    background: rgba(247, 249, 253, .92);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px 0;
    margin-top: 22px;
    border-radius: 18px;
}

.secondary-btn,
.danger-btn,
.success-btn {
    height: 52px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid var(--line);
}

.secondary-btn {
    background: #fff;
    color: var(--blue);
}

.danger-btn {
    background: #e8344c;
    color: #fff;
    border: none;
}

.success-btn {
    background: #20a05a;
    color: #fff;
    border: none;
}

/* الشارات */
.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}

.badge-blue {
    background: #eaf2ff;
    color: #0d54e8;
}

.badge-green {
    background: #e5f7ec;
    color: #17864a;
}

.badge-purple {
    background: #f1eaff;
    color: #6236c9;
}

/* الأزرار المصغرة */
.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
}

.mini-btn.view {
    background: #edf4ff;
    color: #0e58f1;
}

.mini-btn.apply {
    background: #2ca564;
    color: #fff;
}

/* التجاوب */
@media (max-width: 760px) {
    .details-card {
        padding: 18px;
    }

    .info-grid,
    .two-col,
    .documents-grid,
    .bottom-actions {
        grid-template-columns: 1fr;
    }

    .hero-content {
        display: block;
    }

    .hero-logo {
        width: 110px;
        height: 110px;
        margin-bottom: 16px;
    }

    .hero-info h1 {
        font-size: 28px;
    }

    .mini-list {
        grid-template-columns: 1fr;
    }

    .bottom-actions {
        position: relative;
        gap: 12px;
    }

    .tabbar {
        grid-template-columns: 1fr 1fr;
    }

    .tabbar a {
        padding: 14px;
        font-size: 14px;
    }

    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title-row h2 {
        font-size: 17px;
    }
}