/* ═══ Shared sections for the Mudarabah and Musharakah pages ═══
   Both pages already had their own .m-* design system; these .ip-* rules add
   the sections and animations introduced in the 2026-09 pass, in the same
   warm palette, without touching what was there. */

.ip-section { padding: 56px 0; }
.ip-title {
    font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 850; letter-spacing: -.7px;
    color: #1E293B; margin: 0 0 10px; text-align: center;
}
.ip-sub {
    max-width: 760px; margin: 0 auto 32px; text-align: center;
    font-size: 1.02rem; line-height: 1.72; color: #57534E;
}
.ip-link { color: #B45309; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── diagrams ───────────────────────────────────────── */
.ip-art svg { width: 100%; height: auto; max-width: 620px; margin-inline: auto; display: block; }
.ip-svg-t { font: 800 13px Inter, sans-serif; fill: #1E293B; }
.ip-svg-s { font: 400 11.5px Inter, sans-serif; fill: #78716C; }
.ip-svg-w { font: 800 12px Inter, sans-serif; fill: #FFFFFF; }
.ip-svg-r { font: 800 12px Inter, sans-serif; fill: #B91C1C; }

.ipx-in { animation: ipx-fade .7s ease both; }
.ipx-2 { animation-delay: .25s; } .ipx-3 { animation-delay: .5s; } .ipx-4 { animation-delay: .75s; }
@keyframes ipx-fade { from { opacity: 0; } to { opacity: 1; } }
.ipx-grow { animation: ipx-wide 1s cubic-bezier(.2,.8,.3,1) both; transform-box: fill-box; transform-origin: left center; }
.ipx-g2 { animation-delay: .3s; }
@keyframes ipx-wide { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ipx-flow { animation: ipx-travel 3.4s ease-in-out infinite; }
.ipx-fl2 { animation-delay: .6s; } .ipx-fl3 { animation-delay: 1.2s; }
@keyframes ipx-travel { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(120px); } }
.ipx-late { animation: ipx-show 4s ease infinite; }
@keyframes ipx-show { 0%, 55% { opacity: 0; } 70%, 100% { opacity: 1; } }
.ipx-pulse { animation: ipx-beat 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ipx-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ── evidence blocks ────────────────────────────────── */
.ip-dalil {
    padding: 22px 24px; margin-bottom: 16px; border-radius: 16px;
    background: linear-gradient(150deg, #FFF8E7 0%, #FFFFFF 100%);
    border: 1px solid #E9E2D0; border-left: 4px solid #0F766E;
}
.ip-dalil-tag {
    font-size: 12px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
    color: #0F766E; margin-bottom: 10px;
}
.ip-arabic {
    font-family: 'Amiri', 'Scheherazade New', serif; font-size: 25px; line-height: 2;
    color: #1E293B; margin: 0 0 10px; text-align: right;
}
.ip-dalil-text { font-size: 16.5px; line-height: 1.75; color: #1E293B; margin: 0 0 8px; }
.ip-dalil-note { font-size: 14.5px; line-height: 1.7; color: #78716C; margin: 0; }

/* ── cards, notes, faq ──────────────────────────────── */
.ip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.ip-card {
    display: block; padding: 20px; border-radius: 16px; text-decoration: none;
    background: #FFFDF7; border: 1px solid #E9E2D0;
    border-top: 3px solid var(--ip-accent, #D97706);
    transition: transform .18s, box-shadow .18s;
}
.ip-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(120, 80, 0, .1); }
.ip-card i { font-size: 1.1rem; color: var(--ip-accent, #B45309); }
.ip-card h3 { margin: 11px 0 6px; font-size: 1.03rem; font-weight: 780; color: #1E293B; }
.ip-card p { margin: 0; font-size: .9rem; line-height: 1.65; color: #57534E; }

.ip-note {
    display: flex; gap: 14px; padding: 17px 19px; border-radius: 15px;
    font-size: .97rem; line-height: 1.68; border: 1px solid; margin: 20px 0;
}
.ip-note i { font-size: 1.05rem; margin-top: 2px; }
.ip-note--risk { background: rgba(185, 28, 28, .06); border-color: rgba(185, 28, 28, .26); color: #7F1D1D; }
.ip-note--halal { background: rgba(13, 148, 136, .08); border-color: rgba(15, 118, 110, .26); color: #115E59; }
.ip-note--info { background: rgba(245, 158, 11, .10); border-color: rgba(180, 83, 9, .26); color: #7C3E06; }

.ip-faq { display: grid; gap: 11px; max-width: 900px; margin: 0 auto; }
.ip-faq-item { border: 1px solid #E9E2D0; border-radius: 14px; background: #FFFDF7; overflow: hidden; }
.ip-faq-item summary {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 15px 18px; cursor: pointer; list-style: none;
    font-weight: 700; font-size: .99rem; color: #1E293B;
}
.ip-faq-item summary::-webkit-details-marker { display: none; }
.ip-faq-item summary i { color: #B45309; font-size: .8rem; transition: transform .2s; }
.ip-faq-item[open] summary { background: #FFF8E7; }
.ip-faq-item[open] summary i { transform: rotate(180deg); }
.ip-faq-body { padding: 4px 18px 17px; font-size: .94rem; line-height: 1.72; color: #57534E; }
.ip-faq-body p { margin: 0 0 10px; }
.ip-faq-body p:last-child { margin-bottom: 0; }

/* ── comparison rows that become cards on a phone ───── */
.ip-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid #E9E2D0; }
.ip-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #FFFDF7; min-width: 660px; }
.ip-table th {
    background: #FFF8E7; color: #B45309; text-align: left; padding: 13px 16px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
}
.ip-table td { padding: 13px 16px; border-top: 1px solid #F2EADA; color: #57534E; vertical-align: top; }

@media (max-width: 767.98px) {
    .ip-table-wrap { overflow: visible; border: 0; }
    .ip-table { min-width: 0; background: none; }
    .ip-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .ip-table tbody, .ip-table tr, .ip-table td { display: block; width: 100%; }
    .ip-table tr {
        margin-bottom: 14px; border-radius: 15px; background: #FFFDF7;
        border: 1px solid #E9E2D0; border-left: 3px solid #D97706; overflow: hidden;
    }
    .ip-table td {
        display: flex; justify-content: space-between; gap: 14px; text-align: right;
        padding: 9px 15px; border-top: 0;
    }
    .ip-table td + td { border-top: 1px solid #F2EADA; }
    .ip-table td::before {
        content: attr(data-label); flex: 0 0 auto; text-align: left; color: #78716C;
        font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    }
    .ip-table td:first-child { background: #FFF8E7; text-align: left; font-weight: 700; color: #1E293B; }
    .ip-table td:first-child::before { content: none; }
}
@media (max-width: 575.98px) {
    .ip-section { padding: 40px 0; }
    .ip-arabic { font-size: 20px; }
    .ip-dalil { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .ipx-in, .ipx-grow, .ipx-flow, .ipx-late, .ipx-pulse { animation: none !important; opacity: 1; transform: none; }
}


/* Bootstrap paints .table cells itself, so the card layout has to be explicit
   about the cells it is restacking. */
@media (max-width: 767.98px) {
    .ip-table-wrap { overflow: visible !important; }
    .ip-table.table > tbody, .ip-table.table > tbody > tr, .ip-table.table > tbody > tr > td { display: block; width: 100%; }
    .ip-table.table > thead { display: none; }
    .ip-table.table > tbody > tr > td { border-bottom-width: 0; box-shadow: none; }
    .ip-table.table > tbody > tr > td:first-child { background: #FFF8E7 !important; }
}
