/* Visual Services Widget — خدمات تصویری */

.elementor-widget-mohtavanegar_visual_services .mn-vs {
    --mn-vs-text: #3a443d;
    --mn-vs-bg: #e6e7e2;
    --mn-vs-card-bg: #ffffff;
    --mn-vs-cols: 3;
    box-sizing: border-box;
    width: 100%;
    background-color: var(--mn-vs-bg);
    padding: 60px 40px;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs *,
.elementor-widget-mohtavanegar_visual_services .mn-vs *::before,
.elementor-widget-mohtavanegar_visual_services .mn-vs *::after {
    box-sizing: border-box;
}

/* Grid: title spans up to 2 cols + cards fill the rest */
.elementor-widget-mohtavanegar_visual_services .mn-vs__grid {
    display: grid;
    grid-template-columns: repeat(var(--mn-vs-cols, 3), minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    /* Keep visual order matching the design (title left, cards fill right/bottom)
       regardless of site RTL direction. */
    direction: ltr;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs--has-heading .mn-vs__heading {
    grid-column: span min(2, var(--mn-vs-cols, 3));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 140px;
    padding-inline-end: 12px;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title-wrap {
    position: relative;
    display: inline-block;
    margin: 0;
    line-height: 1;
    direction: rtl;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title {
    display: block;
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--mn-vs-text);
    line-height: 1;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title--image {
    font-size: 0;
    line-height: 0;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title-image {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.1rem, 2.2vw, 1.65rem);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.02em;
    color: var(--mn-vs-text);
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    direction: ltr;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__title-overlay--image {
    font-size: 0;
    line-height: 0;
    white-space: normal;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__overlay-image {
    display: block;
    width: 140px;
    max-width: 80vw;
    height: auto;
}

/* Cards */
.elementor-widget-mohtavanegar_visual_services .mn-vs__card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 140px;
    padding: 20px 28px 20px 20px;
    background-color: var(--mn-vs-card-bg);
    border-radius: 28px;
    text-decoration: none;
    color: inherit;
    direction: rtl;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background-color 0.28s ease;
}

.elementor-widget-mohtavanegar_visual_services a.mn-vs__card:hover,
.elementor-widget-mohtavanegar_visual_services a.mn-vs__card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(58, 68, 61, 0.1);
    outline: none;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__card-image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    order: 2; /* image on the visual left in RTL card */
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__card-title {
    flex: 1 1 auto;
    order: 1; /* title on the visual right in RTL card */
    margin: 0;
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    font-weight: 700;
    line-height: 1.45;
    color: var(--mn-vs-text);
    text-align: right;
    word-break: break-word;
}

/* Image fills the whole card when title is hidden */
.elementor-widget-mohtavanegar_visual_services .mn-vs__card--image-only {
    padding: 0;
    overflow: hidden;
    justify-content: center;
    align-items: stretch;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__card--image-only .mn-vs__card-image {
    flex: 1 1 auto;
    order: 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs__card--image-only .mn-vs__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Single-column heading alignment */
.elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols="1"] .mn-vs__heading {
    min-height: 0;
    padding: 8px 4px 16px;
    justify-content: center;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols="1"] .mn-vs__title-wrap {
    display: block;
    text-align: center;
    width: 100%;
}

.elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols="1"] .mn-vs__title {
    text-align: center;
}

/* Tablet */
@media (max-width: 1024px) {
    .elementor-widget-mohtavanegar_visual_services .mn-vs {
        padding: 48px 28px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__grid {
        gap: 18px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs--has-heading .mn-vs__heading {
        min-height: 110px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-tablet="1"] .mn-vs__heading {
        min-height: 0;
        padding: 8px 4px 16px;
        justify-content: center;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-tablet="1"] .mn-vs__title-wrap {
        display: block;
        text-align: center;
        width: 100%;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-tablet="1"] .mn-vs__title {
        text-align: center;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__card {
        min-height: 120px;
        padding: 16px 20px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__card-image {
        width: 96px;
        height: 96px;
    }
}

/* Mobile: spacing/sizing only — column count comes from Elementor responsive control */
@media (max-width: 767px) {
    .elementor-widget-mohtavanegar_visual_services .mn-vs {
        padding: 40px 20px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__grid {
        gap: 14px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs--has-heading .mn-vs__heading {
        min-height: 0;
        padding: 8px 4px 16px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-mobile="1"] .mn-vs__heading {
        justify-content: center;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-mobile="1"] .mn-vs__title-wrap {
        display: block;
        text-align: center;
        width: 100%;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs[data-cols-mobile="1"] .mn-vs__title {
        text-align: center;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__title {
        font-size: 3.25rem;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__card {
        min-height: 110px;
        padding: 16px 20px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__card-image {
        width: 88px;
        height: 88px;
    }

    .elementor-widget-mohtavanegar_visual_services .mn-vs__card-title {
        font-size: 1.2rem;
    }
}
