/* ===== Magic Arches Widget (V3.2.2 - Perfect Arch Shape) ===== */

.ma-arches-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
    /* Increased gap */
    width: 100%;
    padding: 40px 15px;
    box-sizing: border-box;
}

.ma-card-item {
    flex: 1 1 calc(25% - 32px);
    /* 4 columns */
    max-width: 331px;
    min-width: 260px;
    height: 385px;
    /* Slightly taller */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2.5px solid #fdbd68;
    border-bottom-color: #ad5a009c;
    border-radius: 500px 500px 0 0;
    padding: 75px 30px 35px;
    /* Increased padding */
    background: transparent;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.ma-card-item:hover {

    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.15);
}

.ma-card-title {
    font-weight: 750;
    line-height: 1.1;
    height: 100px !important;
    /* Force height for alignment */
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center;
    margin: 0 0 40px !important;
    word-break: break-word;
    color: #386641;
    font-size: 22px;
}

.ma-card-text {
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
    color: #4a4a4a;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    min-height: 90px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center;
}

/* Laptop / Medium Screen (Forcing 2 columns) - Specific range: 993px to 1205px */
@media (min-width: 993px) and (max-width: 1220px) {
    .ma-arches-container {
        display: grid !important;
        grid-template-columns: repeat(2, 331px) !important;
        /* Force exactly 2 columns of original size */
        justify-content: center !important;
        gap: 32px !important;
    }

    .ma-card-item {
        flex: none !important;
        /* Disable flex properties */
        width: 100% !important;
        max-width: 331px !important;
        height: 385px !important;
        /* Original height */
        padding: 75px 30px 35px !important;
        /* Original padding */
    }



    /* Restore visibility */
    .ma-card-item:nth-child(n+5) {
        display: flex !important;
    }
}

/* Tablette (2 columns) */
@media (max-width: 992px) {
    .ma-card-item {
        flex: 1 1 calc(50% - 32px);
        height: 380px;
        padding: 70px 25px 30px;
    }

    .ma-card-title {
        font-size: 20px;
        height: 90px;
        margin-bottom: 35px;
    }
}

/* Mobile (En dessous de 604px) */
@media (max-width: 604px) {
    .ma-card-item {
        flex: 1 1 100%;
        max-width: 331px;
        height: 375px;
        /* On garde la hauteur pour ne pas écraser l'arche */
        border-radius: 500px 500px 0 0;
        padding: 80px 25px 20px;
    }

    .ma-card-title {
        font-size: 18px;
        margin-bottom: 20px;
        height: auto !important;
        /* Resetting height for original mobile look */
    }

    .ma-card-text {
        min-height: auto !important;
        /* Resetting height for original mobile look */
    }
}