.specialties{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* Refined homepage specialty section. */
.section--pale#why-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f4f8ff 0%, #edf5ff 100%);
}

.section--pale#why-section::before {
    position: absolute;
    top: -170px;
    right: -110px;
    width: 380px;
    height: 380px;
    border: 58px solid rgba(28, 106, 214, .06);
    border-radius: 50%;
    content: "";
}

#why-section .wrap { position: relative; }
#why-section .section-title { margin-bottom: 34px; }
#why-section .section-title h2 { margin-bottom: 8px; color: #092b58; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.03em; }
#why-section .section-title p { margin: 0; color: #58708f; font-size: 1rem; font-weight: 500; }

.specialties { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.specialty {
    min-height: 154px;
    margin: 0;
    padding: 24px 18px 20px;
    border: 1px solid #d9e6f5;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(22, 62, 111, .05);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.specialty:hover { transform: translateY(-5px); border-color: #a9cdf7; box-shadow: 0 16px 28px rgba(22, 83, 150, .13); }
.specialty .icon1 {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #e7f1ff;
    color: #1266d6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.specialty h3 { margin: 0; color: #12345d; font-size: .96rem; font-weight: 700; line-height: 1.42; }
.specialty h3 a { color: inherit; text-decoration: none; }
.specialty h3 a:hover { color: #1266d6; }
.specialty:nth-child(2) h3 a::after { content: " (English, Hindi, Bengali)"; }

@media (max-width: 991.98px) { .specialties { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    #why-section .section-title { margin-bottom: 24px; }
    .specialties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .specialty { min-height: 138px; padding: 18px 14px; }
    .specialty .icon1 { width: 38px; height: 38px; margin-bottom: 13px; font-size: .95rem; }
    .specialty h3 { font-size: .82rem; }
}
@media (max-width: 767.98px) { .specialties { grid-template-columns: 1fr; } .specialty { min-height: 0; } }

.specialty{
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;                 /* Icon ও Text-এর মাঝে ছোট gap */
    margin-bottom: 20px;
}

/* Icon Style */
.specialty .icon1{
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #eaf2ff;
    border: 2px solid #1266d6;
    color: #1266d6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.specialty h3{
    margin: 0;
    font-size: .86rem;
    line-height: 1.3;
}

.specialty h3 a{
    display: block;
    text-decoration: none;
    color: inherit;
}

.specialty h3 a:hover{
    color: #1266d6;
}

.specialty:nth-child(2) h3 a::after{
    content: " (English, Hindi, Bengali)";
}

.specialty p{
    display: none;
}

@media (max-width:991.98px){
    .specialties{
        grid-template-columns: repeat(3,1fr);
    }
}

@media (max-width:767.98px){
    .specialties{
        grid-template-columns: repeat(2,1fr);
    }

    .specialty{
        min-height: 156px;
        gap: 5px;
    }

    .specialty .icon{
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 14px;
    }

    .specialty h3{
        font-size: .82rem;
    }
}

/* Final overrides keep the refined cards ahead of legacy specialty rules above. */
.specialties { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.specialty {
    min-height: 154px;
    margin: 0;
    padding: 24px 18px 20px;
    border: 1px solid #d9e6f5;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(22, 62, 111, .05);
    display: block;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.specialty:hover { transform: translateY(-5px); border-color: #a9cdf7; box-shadow: 0 16px 28px rgba(22, 83, 150, .13); }
.specialty .icon1 { width: 44px; height: 44px; min-width: 0; margin: 0 0 18px; padding: 0; border: 0; border-radius: 12px; background: #e7f1ff; color: #1266d6; font-size: 1.1rem; }
.specialty h3 { margin: 0; color: #12345d; font-size: .96rem; font-weight: 700; line-height: 1.42; }
.specialty h3 a { display: block; color: inherit; text-decoration: none; }
.specialty h3 a:hover { color: #1266d6; }

@media (max-width: 991.98px) { .specialties { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    #why-section .section-title { margin-bottom: 24px; }
    .specialties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .specialty { min-height: 138px; padding: 18px 14px; }
    .specialty .icon1 { width: 38px; height: 38px; margin-bottom: 13px; font-size: .95rem; }
    .specialty h3 { font-size: .82rem; }
}
@media (max-width: 767.98px) { .specialties { grid-template-columns: 1fr; } .specialty { min-height: 0; } }
