/* Uniphar Medtech specialties: links to the sister websites
   (templates/_includes/group-specialties.html) */

.group-specialties {
    margin: 3.5em auto 0;
    max-width: 1060px;
    text-align: center;
}

.group-specialties__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 2em;
}

.group-specialties__intro::before {
    content: "";
    display: block;
    width: 64px;
    height: 2px;
    margin-bottom: 1.5em;
    background: var(--uniphar-light-blue);
}

.group-specialties__tagline {
    margin: 0;
    color: var(--uniphar-blue);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.group-specialties__grid {
    /* Flex (not grid) so an incomplete last row is centred:
       7 tiles = 4+3 desktop, 3+3+1 tablet, 2+2+2+1 phone */
    --gs-cols: 2;
    --gs-gap: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gs-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media only screen and (min-width: 768px) {
    .group-specialties__grid {
        --gs-cols: 3;
        --gs-gap: 16px;
    }
}

@media only screen and (min-width: 1200px) {
    .group-specialties__grid {
        --gs-cols: 4;
    }
}

.group-specialties__item {
    display: flex;
    flex: 0 0 calc((100% - (var(--gs-cols) - 1) * var(--gs-gap)) / var(--gs-cols));
}

.group-specialties__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1.5em 1em 1.25em;
    border: 1px solid rgba(var(--uniphar-navy-rgb), 0.12);
    border-radius: 16px;
    background: var(--uniphar-white);
    color: var(--uniphar-navy);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.group-specialties__card:hover,
a.group-specialties__card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--uniphar-blue);
    box-shadow: 0 10px 24px rgba(var(--uniphar-navy-rgb), 0.12);
    text-decoration: none;
}

a.group-specialties__card:focus-visible {
    outline: 3px solid var(--uniphar-light-blue);
    outline-offset: 2px;
}

.group-specialties__card--current {
    background: rgba(var(--uniphar-blue-rgb), 0.06);
    border-color: rgba(var(--uniphar-blue-rgb), 0.35);
}

.group-specialties__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 0.9em;
    border-radius: 50%;
    background: rgba(var(--uniphar-blue-rgb), 0.08);
    color: var(--uniphar-blue);
}

.group-specialties__icon svg {
    width: 30px;
    height: 30px;
}

/* Icons from SVG files have tighter artboards than the 24px line icons,
   so draw them slightly smaller to balance the row. */
.group-specialties__icon svg.group-specialties__icon-file {
    width: 26px;
    height: 26px;
}

/* The spine is tall and narrow, so give it a larger box to match the
   visual size of the other icons. */
.group-specialties__icon svg.group-specialties__icon--spine {
    width: 32px;
    height: 32px;
}

.group-specialties__card--current .group-specialties__icon {
    background: var(--uniphar-blue);
    color: var(--uniphar-white);
}

.group-specialties__name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.group-specialties__subtitle {
    /* Second line of the title: same size, weight and colour as the name */
    display: block;
}

.group-specialties__desc {
    flex-grow: 1;
    margin-top: 0.6em;
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(var(--uniphar-navy-rgb), 0.75);
}

.group-specialties__cta {
    margin-top: 1em;
    font-size: 14px;
    font-weight: 600;
    color: var(--uniphar-blue);
}

.group-specialties__cta--current {
    padding: 0.2em 0.8em;
    border-radius: 40px;
    background: var(--uniphar-blue);
    color: var(--uniphar-white);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.group-specialties__content {
    max-width: 1000px;
    margin: 2em auto 0;
    color: var(--uniphar-navy);
    font-size: 17px;
    line-height: 1.55;
}

.group-specialties__content p {
    margin: 0;
}
@media (prefers-reduced-motion: reduce) {
    .group-specialties__card {
        transition: none;
    }
    a.group-specialties__card:hover,
    a.group-specialties__card:focus-visible {
        transform: none;
    }
}
