/* ==========================================================================
   Miftah - Découvrez nos projets en cours Widget Style
   ========================================================================== */

.mpec-container {
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Section Title ── */
.mpec-section-title {
    color: #002a3a;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 40px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

/* ── Grid ── */
.mpec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ── Card ── */
.mpec-card {
    position: relative;
    height: 450px;
    border-radius: 0px; /* Sharp premium edges */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Background image hover zoom */
.mpec-card .mpec-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mpec-card:hover .mpec-bg {
    transform: scale(1.06);
}

/* Bottom gradient overlay */
.mpec-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(to top, var(--ov-bottom, rgba(0, 42, 58, 0.88)), var(--ov-top, rgba(0, 42, 58, 0)));
    z-index: 1;
    pointer-events: none;
}

/* ── Status Badge (top-right) ── */
.mpec-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    background: rgba(0, 42, 58, 0.70);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 0px; /* Sharp corners */
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Content area (bottom) ── */
.mpec-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 24px;
}

/* Title */
.mpec-title {
    color: #ffffff;
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Description */
.mpec-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 16px 0;
    max-width: 90%;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ── CTA Button (Outlined) ── */
.mpec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff; /* White text matching mockup */
    background: transparent; /* Transparent background */
    border: 1.5px solid #ffffff; /* White outlined border */
    border-radius: 2px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
}

.mpec-btn:hover {
    background: #ffffff;
    color: #0f2e5c; /* Navy dark blue text color on hover */
    border-color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */

@media (max-width: 1024px) {
    .mpec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mpec-card {
        height: 380px;
    }
    
    .mpec-section-title {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .mpec-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mpec-card {
        height: 350px;
    }
    
    .mpec-section-title {
        font-size: 26px;
        margin-bottom: 24px;
    }
    
    .mpec-title {
        font-size: 24px;
    }
    
    .mpec-desc {
        font-size: 12px;
        max-width: 100%;
    }
    
    .mpec-btn {
        font-size: 12px;
        padding: 9px 18px;
    }
}
