/* ═══ Musharakah Pools ═══
   Extracted from the template so browsers cache it instead of re-sending it
   with every page view. Page-local .m-* classes only. */

    :root {
        --m-musharakah: #ffc107;
        --m-musharakah-dark: #d9a300;
        --m-musharakah-light: #fffbeb;
        --m-primary-dark: #1f2937;
        --m-text-light: #6b7280;
        --m-bg-light: #f8f9fa;
        --m-white: #ffffff;
        --m-danger: #dc2626;
        --m-success: #28a745;
    }

    body {
        background: var(--m-white) !important;
        color: var(--m-primary-dark) !important;
        font-family: 'Poppins', sans-serif !important;
        scroll-behavior: smooth;
    }

    .m-section {
        padding: 80px 0;
    }

    .m-heading {
        font-weight: 700;
        color: var(--m-primary-dark);
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .m-subheading {
        color: var(--m-text-light);
        font-size: 1.1rem;
        line-height: 1.6;
        text-align: center;
        max-width: 800px;
        margin: 0 auto 3rem;
    }

    /* Hero Section */
    .m-hero {
        background: linear-gradient(135deg, #fffcf0 0%, #ffffff 100%);
        padding: 100px 0;
        border-bottom: 1px solid #e5e7eb;
        overflow: hidden;
    }

    /* Hadith Banner */
    .hadith-banner {
        background: var(--m-primary-dark);
        color: white;
        padding: 40px 0;
        text-align: center;
        border-left: 10px solid var(--m-musharakah);
    }

    .arabic-text {
        font-family: 'Amiri', serif;
        font-size: 1.5rem;
        line-height: 2;
        direction: rtl;
    }

    /* Pool Cards */
    .m-pool-card {
        background: var(--m-white);
        border-radius: 12px;
        /* Removed overflow: hidden to prevent clipping of top seal */
        overflow: visible;
        border: 1px solid #eee;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        height: 100%;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .m-pool-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.15);
    }

    .m-card-header {
        background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
        padding: 25px 20px;
        text-align: center;
        color: var(--m-primary-dark);
        position: relative;
        border-top-left-radius: 12px;
        /* Maintain radius with overflow visible */
        border-top-right-radius: 12px;
    }

    .m-card-badge {
        background: #ffffff;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .m-contribution-box {
        background: #fff9e6;
        border: 2px solid #ffc107;
        border-radius: 12px;
        padding: 20px;
        text-align: center;
        margin: 20px;
    }

    .m-stats-list {
        padding: 0 20px 20px;
        flex-grow: 1;
    }

    .m-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.85rem;
    }

    .m-stat-item:last-child {
        border-bottom: none;
    }

    .m-stat-label {
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .sector-tag {
        background: #eef2f7;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 0.7rem;
        font-weight: 500;
        color: #4a5568;
    }

    .btn-contribute {
        background: #ffc107;
        color: #1a1a1a;
        font-weight: 700;
        border: none;
        padding: 12px;
        border-radius: 8px;
        margin: 0 20px 10px;
        transition: 0.3s;
    }

    .btn-contribute:hover {
        background: #e6b800;
        transform: translateY(-2px);
    }

    .btn-transparency {
        background: #fff;
        color: #1a1a1a;
        font-weight: 600;
        border: 1px solid #1a1a1a;
        padding: 10px;
        border-radius: 8px;
        margin: 0 20px 20px;
        transition: 0.3s;
        text-decoration: none;
        text-align: center;
        font-size: 0.85rem;
    }

    .btn-transparency:hover {
        background: #f8f9fa;
    }

    .infographic-card {
        background: var(--m-white);
        border-radius: 16px;
        padding: 30px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        border: 1px solid #e5e7eb;
    }

    .step-number {
        width: 60px;
        height: 60px;
        background: var(--m-musharakah);
        color: var(--m-primary-dark);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .compare-card-musharakah {
        border-left: 4px solid var(--m-musharakah);
    }

    .compare-card-mudarabah {
        border-left: 4px solid var(--m-success);
    }

    .risk-box {
        max-width: 900px;
        margin: 0 auto;
    }

    .btn-musharakah {
        background: var(--m-musharakah);
        color: var(--m-primary-dark);
        font-weight: 600;
        border: none;
        padding: 12px 30px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .btn-musharakah:hover {
        background: var(--m-musharakah-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    }

    .pool-duration-badge {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.95);
        padding: 8px 15px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--m-primary-dark);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .return-highlight {
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
        padding: 15px;
        border-radius: 10px;
        border-left: 4px solid var(--m-success);
        margin: 15px 20px;
    }

    .profit-badge {
        background: var(--m-success);
        color: white;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 700;
    }

    .authentic-musharakah-seal {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: #28a745;
        color: white;
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 700;
        box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
    }

    @media (max-width: 768px) {
        .m-hero h1 {
            font-size: 2.5rem !important;
        }

        .m-section {
            padding: 50px 0;
        }
    }
