/* =========================================================
   CIDMED - ESPECIALIDADES
   Diseño aislado para no modificar style.css
   ========================================================= */

#steps.steps {
    position: relative;
    padding: 100px 0;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7faf9 52%,
            #f4f7fb 100%
        );
    overflow: hidden;
}

/* =========================================================
   DECORACIÓN DE FONDO
   ========================================================= */

#steps.steps::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    top: -210px;
    right: -180px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(88, 171, 149, 0.10) 0%,
        rgba(88, 171, 149, 0.035) 45%,
        transparent 72%
    );
    pointer-events: none;
}

#steps.steps::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    bottom: -220px;
    left: -190px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(52, 74, 108, 0.08) 0%,
        rgba(52, 74, 108, 0.025) 45%,
        transparent 72%
    );
    pointer-events: none;
}

/* =========================================================
   CONTENEDOR
   ========================================================= */

#steps.steps .container {
    position: relative;
    z-index: 2;
}

/* =========================================================
   TÍTULO DE SECCIÓN
   ========================================================= */

#steps.steps .section-title {
    position: relative;
    margin-bottom: 55px;
    text-align: center;
}

#steps.steps .section-title h2 {
    position: relative;
    display: inline-block;
    margin: 0;
    padding-bottom: 18px;

    color: #2d405f;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.4px;
    text-transform: none;
}

/* Línea decorativa */
#steps.steps .section-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;

    width: 58px;
    height: 3px;

    border-radius: 10px;
    background: #58ab95;

    transform: translateX(-50%);
}

/* Pequeño detalle sobre la línea */
#steps.steps .section-title h2::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;

    width: 18px;
    height: 3px;

    border-radius: 10px;
    background: #344a6c;

    transform: translateX(-50%);
    z-index: 1;
}

/* =========================================================
   GRID
   ========================================================= */

#steps.steps .row.no-gutters {
    margin-left: -10px;
    margin-right: -10px;
}

/* =========================================================
   CARD DE ESPECIALIDAD
   ========================================================= */

#steps.steps .content-item {
    position: relative;

    margin: 10px;
    padding: 30px 28px 32px;

    min-height: 350px;
    width: calc(33.333333% - 20px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    text-align: center;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(52, 74, 108, 0.08);
    border-radius: 20px;

    box-shadow:
        0 10px 30px rgba(45, 64, 95, 0.055);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* Línea superior decorativa */
#steps.steps .content-item::before {
    content: "";

    position: absolute;
    top: 0;
    left: 50%;

    width: 0;
    height: 3px;

    border-radius: 0 0 10px 10px;

    background: linear-gradient(
        90deg,
        #58ab95,
        #344a6c
    );

    transform: translateX(-50%);

    transition: width 0.35s ease;
}

/* Hover card */
#steps.steps .content-item:hover {
    transform: translateY(-8px);

    border-color: rgba(88, 171, 149, 0.20);

    box-shadow:
        0 20px 45px rgba(45, 64, 95, 0.11);
}

#steps.steps .content-item:hover::before {
    width: 70px;
}

/* =========================================================
   IMAGEN
   ========================================================= */

#steps.steps .content-item .image {
    width: 145px;
    height: 145px;

    object-fit: contain;

    margin: 5px 0 22px;

    padding: 14px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(88, 171, 149, 0.13) 0%,
            rgba(88, 171, 149, 0.05) 58%,
            rgba(88, 171, 149, 0.015) 75%,
            transparent 76%
        );

    border: 1px solid rgba(88, 171, 149, 0.13);

    filter: drop-shadow(
        0 8px 12px rgba(45, 64, 95, 0.08)
    );

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

/* Hover imagen */
#steps.steps .content-item:hover .image {
    transform: scale(1.06);

    filter: drop-shadow(
        0 12px 18px rgba(45, 64, 95, 0.12)
    );
}

/* =========================================================
   TÍTULO DE ESPECIALIDAD
   ========================================================= */

#steps.steps .content-item h4 {
    margin: 0 0 12px;

    color: #2d405f !important;

    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;

    transition:
        color 0.3s ease;
}

#steps.steps .content-item:hover h4 {
    color: #58ab95 !important;
}

/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

#steps.steps .content-item p {
    margin: 0;

    max-width: 310px;

    color: #687487;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}

/* =========================================================
   VARIACIÓN VISUAL SUTIL
   ========================================================= */

/* Segunda y cuarta card con pequeño toque azul */
#steps.steps .content-item:nth-child(2) .image,
#steps.steps .content-item:nth-child(4) .image {
    background:
        radial-gradient(
            circle,
            rgba(52, 74, 108, 0.11) 0%,
            rgba(52, 74, 108, 0.045) 58%,
            rgba(52, 74, 108, 0.01) 75%,
            transparent 76%
        );

    border-color: rgba(52, 74, 108, 0.11);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1199px) {

    #steps.steps {
        padding: 85px 0;
    }

    #steps.steps .section-title {
        margin-bottom: 45px;
    }

    #steps.steps .content-item {
        min-height: 330px;
        padding: 27px 22px 30px;
    }

    #steps.steps .content-item .image {
        width: 130px;
        height: 130px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    #steps.steps {
        padding: 70px 0;
    }

    #steps.steps .section-title {
        margin-bottom: 35px;
    }

    #steps.steps .section-title h2 {
        font-size: 30px;
    }

    #steps.steps .row.no-gutters {
        margin-left: 0;
        margin-right: 0;
    }

    #steps.steps .content-item {
        margin: 8px 0;
        min-height: auto;
        padding: 28px 24px 30px;
    }

    #steps.steps .content-item .image {
        width: 125px;
        height: 125px;
        margin-bottom: 20px;
    }

    #steps.steps .content-item h4 {
        font-size: 18px;
    }

    #steps.steps .content-item p {
        max-width: 100%;
        font-size: 14px;
    }
}

/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width: 575px) {

    #steps.steps {
        padding: 55px 0;
    }

    #steps.steps .section-title h2 {
        font-size: 27px;
    }

    #steps.steps .content-item {
        border-radius: 17px;
        padding: 25px 20px 28px;
    }

    #steps.steps .content-item .image {
        width: 110px;
        height: 110px;
        padding: 12px;
    }

    #steps.steps .content-item h4 {
        font-size: 17px;
    }

    #steps.steps .content-item p {
        font-size: 13.5px;
        line-height: 1.65;
    }
}

/* =========================================================
   REDUCIR ANIMACIONES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #steps.steps .content-item,
    #steps.steps .content-item .image,
    #steps.steps .content-item h4,
    #steps.steps .content-item::before {
        transition: none;
    }

    #steps.steps .content-item:hover {
        transform: none;
    }

    #steps.steps .content-item:hover .image {
        transform: none;
    }
}

/* =========================================================
   DISTRIBUCIÓN RESPONSIVE
   ========================================================= */

/* Desktop: 3 columnas */
@media (min-width: 992px) {
    #steps.steps .content-item {
        flex: 0 0 calc(33.333333% - 20px);
        max-width: calc(33.333333% - 20px);
    }
}

/* Tablet: 2 columnas */
@media (min-width: 768px) and (max-width: 991px) {
    #steps.steps .content-item {
        flex: 0 0 calc(50% - 16px);
        max-width: calc(50% - 16px);
    }
}

/* Mobile: 1 columna */
@media (max-width: 767px) {
    #steps.steps .content-item {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        margin: 8px 0;
    }
}