/*
 * Segmentos atendidos
 * Engerádios
 */

.segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1120px;
    margin: 0 auto;
}

.segment-card {
    position: relative;
    min-height: 230px;
    padding: 30px 24px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: hidden;

    color: #111;
    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(215, 25, 32, 0.08),
            transparent 52%
        ),
        linear-gradient(145deg, #ffffff, #f8f8f9);

    border: 1px solid #e2e3e6;
    border-radius: 20px;

    box-shadow:
        0 10px 28px rgba(17, 17, 17, 0.055);

    transition:
        transform 280ms ease,
        border-color 280ms ease,
        box-shadow 280ms ease,
        background 280ms ease;
}

.segment-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 52px;
    height: 4px;

    background: #d71920;
    border-radius: 0 0 8px 8px;

    transform: translateX(-50%);

    transition:
        width 280ms ease,
        height 280ms ease;
}

.segment-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -48px;
    width: 128px;
    height: 128px;

    border: 22px solid rgba(215, 25, 32, 0.035);
    border-radius: 50%;

    pointer-events: none;

    transition:
        transform 350ms ease,
        border-color 350ms ease;
}

.segment-card:hover,
.segment-card:focus-within {
    transform: translateY(-8px);

    border-color: rgba(215, 25, 32, 0.42);

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(215, 25, 32, 0.13),
            transparent 58%
        ),
        #ffffff;

    box-shadow:
        0 20px 48px rgba(17, 17, 17, 0.12);
}

.segment-card:hover::before,
.segment-card:focus-within::before {
    width: 100%;
    height: 5px;
    border-radius: 0;
}

.segment-card:hover::after,
.segment-card:focus-within::after {
    transform: scale(1.18);
    border-color: rgba(215, 25, 32, 0.065);
}

.segment-card__icon {
    position: relative;
    z-index: 1;

    width: 72px;
    height: 72px;

    display: grid;
    place-items: center;

    color: #d71920;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f1f1f3
        );

    border: 1px solid rgba(215, 25, 32, 0.18);
    border-radius: 20px;

    box-shadow:
        0 10px 24px rgba(215, 25, 32, 0.1);

    transition:
        color 280ms ease,
        background 280ms ease,
        border-radius 280ms ease,
        transform 280ms ease;
}

.segment-card:hover .segment-card__icon {
    color: #ffffff;
    background: #d71920;
    border-color: #d71920;
    border-radius: 50%;
    transform: translateY(-2px) scale(1.04);
}

.segment-card__icon svg {
    width: 35px;
    height: 35px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.segment-card__content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.segment-card__title {
    margin: 0 0 7px;

    color: #111;

    font-family: Montserrat, Arial, sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.25;
}

.segment-card__description {
    max-width: 260px;
    margin: 0;

    color: #62666c;

    font-size: 0.9rem;
    line-height: 1.55;
}

.segment-card__detail {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-top: 13px;

    color: #a90e14;

    font-family: Montserrat, Arial, sans-serif;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;

    opacity: 0.78;

    transition:
        gap 220ms ease,
        opacity 220ms ease;
}

.segment-card__detail::after {
    content: "→";
    font-size: 1rem;
}

.segment-card:hover .segment-card__detail {
    gap: 11px;
    opacity: 1;
}

@media (min-width: 1180px) {
    .segments {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px;
    }

    .segment-card {
        min-height: 238px;
        padding: 27px 14px 23px;
    }

    .segment-card__title {
        font-size: 0.96rem;
    }

    .segment-card__description {
        font-size: 0.79rem;
        line-height: 1.48;
    }

    .segment-card__detail {
        font-size: 0.65rem;
    }
}

@media (max-width: 780px) {
    .segments {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .segment-card {
        min-height: 215px;
    }
}

@media (max-width: 520px) {
    .segments {
        grid-template-columns: 1fr;
    }

    .segment-card {
        min-height: auto;
        padding: 26px 22px;

        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .segment-card__icon {
        width: 64px;
        height: 64px;
        flex: 0 0 64px;
    }

    .segment-card__content {
        align-items: flex-start;
    }

    .segment-card__description {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .segment-card,
    .segment-card::before,
    .segment-card::after,
    .segment-card__icon,
    .segment-card__detail {
        transition: none;
    }

    .segment-card:hover {
        transform: none;
    }
}
