/* Tarazia v0.4.2 — balanced services layout and overflow fixes */
#services.section-block{
    overflow:visible;
}

#services .service-bento{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-auto-rows:auto;
    gap:20px;
    align-items:stretch;
}

#services .bento-card{
    min-width:0;
    min-height:270px;
    height:100%;
    display:flex;
    flex-direction:column;
    padding:28px;
    overflow:hidden;
    isolation:isolate;
}

#services .bento-card h3{
    line-height:1.55;
    overflow-wrap:anywhere;
}

#services .bento-card p{
    line-height:1.95;
    overflow-wrap:anywhere;
}

#services .bento-card:not(.bento-large) .service-icon{
    flex:0 0 auto;
}

#services .bento-card:not(.bento-large) .micro-progress,
#services .bento-card:not(.bento-large) .installment-dots,
#services .bento-card:not(.bento-large) .rule-demo,
#services .bento-card:not(.bento-large) .goal-orbit{
    margin-top:auto;
}

#services .bento-card:not(.bento-large) .micro-progress{
    width:100%;
}

#services .bento-card:not(.bento-large) .rule-demo{
    align-self:flex-start;
    max-width:100%;
    white-space:normal;
}

#services .bento-card:not(.bento-large) .goal-orbit{
    margin-inline:auto;
}

#services .bento-large{
    grid-column:1 / -1;
    grid-row:auto;
    min-height:330px;
    display:grid;
    grid-template-columns:58px minmax(0,1fr) minmax(340px,.82fr);
    align-items:center;
    gap:24px;
    padding:36px 40px;
    transform:none !important;
}

#services .bento-large:hover{
    transform:translateY(-4px) !important;
}

#services .bento-large .service-icon{
    align-self:start;
    margin:0;
}

#services .bento-large > div:first-of-type{
    min-width:0;
}

#services .bento-large h3{
    margin-top:8px;
    font-size:clamp(28px,3vw,39px);
}

#services .bento-large p{
    max-width:680px;
    font-size:15px;
}

#services .bento-large .micro-forecast{
    position:relative;
    inset:auto;
    left:auto;
    right:auto;
    bottom:auto;
    width:100%;
    height:190px;
    margin:0;
    padding:24px 22px 16px;
    align-self:stretch;
    border:1px solid rgba(255,255,255,.14);
    border-radius:20px;
    background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.035));
    box-shadow:inset 0 1px rgba(255,255,255,.08);
}

#services .bento-large .micro-forecast:before{
    content:"روند پیش‌بینی مانده";
    position:absolute;
    top:12px;
    right:18px;
    color:rgba(255,255,255,.72);
    font-size:11px;
    font-weight:700;
}

#services .bento-large .micro-forecast i{
    min-width:0;
}

@media (max-width:1100px){
    #services .service-bento{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    #services .bento-large{
        grid-column:1 / -1;
        grid-template-columns:54px minmax(0,1fr) minmax(280px,.78fr);
        padding:32px;
    }
}

@media (max-width:820px){
    #services.section-block{
        padding-block:80px;
    }
    #services .service-bento{
        grid-template-columns:1fr;
        gap:16px;
    }
    #services .bento-card,
    #services .bento-large{
        grid-column:auto;
        min-height:0;
        height:auto;
    }
    #services .bento-card{
        padding:24px;
    }
    #services .bento-large{
        display:grid;
        grid-template-columns:1fr;
        gap:17px;
        padding:28px;
    }
    #services .bento-large .service-icon{
        margin-bottom:0;
    }
    #services .bento-large .micro-forecast{
        height:160px;
        margin-top:4px;
    }
    #services .bento-card:not(.bento-large) .micro-progress,
    #services .bento-card:not(.bento-large) .installment-dots,
    #services .bento-card:not(.bento-large) .rule-demo,
    #services .bento-card:not(.bento-large) .goal-orbit{
        margin-top:24px;
    }
}

@media (max-width:480px){
    #services .bento-card,
    #services .bento-large{
        border-radius:18px;
        padding:21px;
    }
    #services .bento-large h3{
        font-size:27px;
    }
    #services .bento-large .micro-forecast{
        height:140px;
        gap:7px;
        padding-inline:14px;
    }
}
