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

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

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

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

#services.services::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -220px;
    bottom: -220px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(52, 74, 108, 0.09) 0%,
        rgba(52, 74, 108, 0.025) 48%,
        transparent 72%
    );
    pointer-events: none;
}

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

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

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

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

#services.services .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 verde */
#services.services .section-title h2::after {
    content: "";
    position: absolute;

    left: 50%;
    bottom: 0;

    width: 58px;
    height: 3px;

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

    transform: translateX(-50%);
}

/* Detalle azul central */
#services.services .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
   ========================================================= */

#services.services .row {
    margin-left: -10px;
    margin-right: -10px;
}

/* =========================================================
   COLUMNA
   ========================================================= */

#services.services .row > [class*="col-"] {
    padding: 10px !important;
}

/* =========================================================
   CARD
   ========================================================= */

#services.services .icon-box {
    position: relative;

    width: 100%;
    height: 100%;
    min-height: 310px;

    padding: 32px 25px 30px;

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

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

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

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

    overflow: hidden;

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

/* Línea superior */
#services.services .icon-box::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 */
#services.services .icon-box:hover {
    transform: translateY(-8px);

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

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

#services.services .icon-box:hover::before {
    width: 70px;
}

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

#services.services .icon-box .icon {
    width: 125px;
    height: 125px;

    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

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

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

    transition:
        transform 0.4s ease,
        background 0.4s ease,
        border-color 0.4s ease;
}

/* Imagen */
#services.services .icon-box .icon .image {
    width: 82px;
    height: 82px;

    object-fit: contain;

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

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

/* Hover imagen */
#services.services .icon-box:hover .icon {
    transform: scale(1.04);

    background:
        radial-gradient(
            circle,
            rgba(88, 171, 149, 0.19) 0%,
            rgba(88, 171, 149, 0.075) 58%,
            rgba(88, 171, 149, 0.02) 75%,
            transparent 76%
        );

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

#services.services .icon-box:hover .image {
    transform: scale(1.07);

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

/* =========================================================
   TÍTULO DEL SERVICIO
   ========================================================= */

#services.services .icon-box .title {
    margin: 0 0 11px;

    line-height: 1.3;
}

/* El <a> tiene inline style en el PHP,
   por eso usamos !important */
#services.services .icon-box .title a {
    color: #2d405f !important;

    font-size: 19px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.3s ease;
}

#services.services .icon-box:hover .title a {
    color: #58ab95 !important;
}

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

#services.services .icon-box .description {
    margin: 0;

    max-width: 270px;

    color: #687487;

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

/* =========================================================
   VARIACIÓN AZUL
   ========================================================= */

#services.services .icon-box:nth-child(2) .icon,
#services.services .icon-box:nth-child(4) .icon {
    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) {

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

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

    #services.services .icon-box {
        min-height: 300px;
        padding: 28px 20px;
    }

    #services.services .icon-box .icon {
        width: 115px;
        height: 115px;
    }

    #services.services .icon-box .icon .image {
        width: 75px;
        height: 75px;
    }
}

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

@media (max-width: 767px) {

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

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

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

    #services.services .row {
        margin-left: 0;
        margin-right: 0;
    }

    #services.services .row > [class*="col-"] {
        padding: 8px 0 !important;
    }

    #services.services .icon-box {
        min-height: auto;
        padding: 28px 24px 30px;
    }

    #services.services .icon-box .icon {
        width: 120px;
        height: 120px;
        margin-bottom: 21px;
    }

    #services.services .icon-box .icon .image {
        width: 78px;
        height: 78px;
    }

    #services.services .icon-box .title a {
        font-size: 18px;
    }

    #services.services .icon-box .description {
        max-width: 100%;
        font-size: 14px;
    }
}

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

@media (max-width: 575px) {

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

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

    #services.services .icon-box {
        border-radius: 17px;
        padding: 25px 20px 28px;
    }

    #services.services .icon-box .icon {
        width: 105px;
        height: 105px;
    }

    #services.services .icon-box .icon .image {
        width: 68px;
        height: 68px;
    }

    #services.services .icon-box .title a {
        font-size: 17px;
    }

    #services.services .icon-box .description {
        font-size: 13.5px;
        line-height: 1.65;
    }
}

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

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

    #services.services .icon-box,
    #services.services .icon-box .icon,
    #services.services .icon-box .image,
    #services.services .icon-box .title a,
    #services.services .icon-box::before {
        transition: none;
    }

    #services.services .icon-box:hover {
        transform: none;
    }

    #services.services .icon-box:hover .icon,
    #services.services .icon-box:hover .image {
        transform: none;
    }
}