#certification {
    background-color: var(--wp--preset--color--tertiary);
    background-position: center top, center center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, cover;
    /* El primer valor (scroll) aplica al gradiente para que se mueva con la sección,
       el segundo valor (fixed) aplica a la imagen para el efecto parallax */
    background-attachment: scroll, fixed;
    position: relative;
    overflow: hidden;

    & .content {
        text-align: center;

        & .grid-containers {
            margin-top: 3rem;
            display: grid;
            gap: 2rem;

            & .containers {
                display: grid;
                gap: 1rem;
                perspective: 1200px;

                & .cert-container {
                    position: relative;
                    z-index: 4;
                    display: grid;
                    grid-template-rows: 1fr auto;
                    background-color: color-mix(in srgb, var(--wp--preset--color--base) 50%, transparent);
                    backdrop-filter: blur(5px);
                    max-width: 411px;
                    overflow: hidden;
                    box-shadow: #1d224f09 0 -2px 0 inset, #1d224f09 0px 54px 55px, #1d224f04 0px -12px 30px, #1d224f04 0px 4px 6px, #1d224f04 0px 12px 13px, #1d224f04 0px -3px 5px;
                    border: 1px solid rgba(0, 0, 0, 0.06);
                    transition: border-color .3s ease, box-shadow .3s ease;
                    transform-origin: center center;

                    &:has(.slideshow--wrapper .slideshow .module-card .module-card--content .info-bar-text) {
                        background-color: color-mix(in srgb, var(--wp--preset--color--secondary) 50%, transparent);
                        padding-top: 1rem;
                    }

                    /* Resplandor interno dinámico */
                    &::before {
                        content: "";
                        position: absolute;
                        inset: 0;
                        background: radial-gradient(350px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.75), transparent 50%);
                        opacity: 0;
                        transition: opacity 0.4s ease;
                        pointer-events: none;
                        z-index: -1;
                        border-radius: inherit;
                        corner-shape: inherit;
                    }

                    /* Borde dinámico que sigue al ratón */
                    &::after {
                        content: "";
                        position: absolute;
                        inset: -1px;
                        background: radial-gradient(300px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 162, 255, 0.8), transparent 50%);
                        opacity: 0;
                        transition: opacity 0.4s ease;
                        pointer-events: none;
                        z-index: 1;
                        border-radius: inherit;
                        corner-shape: inherit;
                        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                        -webkit-mask-composite: xor;
                        mask-composite: exclude;
                        padding: 1px;
                    }

                    &:hover::before,
                    &:hover::after {
                        opacity: 1;
                    }

                    &:hover {
                        border-color: rgba(0, 162, 255, 0.3);
                        box-shadow: var(--wp--preset--shadow--post-shadow-light);

                        & .slideshow--wrapper {
                            & .slideshow {

                                & .module-card {
                                    & .module-card--content {
                                        & .module-icon {
                                            color: var(--wp--preset--color--focus);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    & .span-pretext--wrapper {
                        padding: 1rem;

                        & .span-pretext {
                            text-align: left;

                        }
                    }

                    & .slideshow--wrapper {
                        width: 100%;
                        height: 80px;
                        position: relative;
                        color: var(--wp--preset--color--contrast);
                        z-index: 5;

                        &:has(.slideshow .module-card .module-card--content .step-title) {
                            height: 90px;
                        }

                        &:has(.slideshow .module-card .module-card--content .info-bar-text) {
                            height: 60px;
                        }

                        & .slideshow {
                            position: relative;
                            width: 100%;
                            height: 100%;

                            & .module-card {
                                position: absolute;
                                inset: 0;
                                width: 100%;
                                opacity: 0;
                                pointer-events: none;

                                &.active {
                                    opacity: 1;
                                    pointer-events: auto;

                                    & .module-card--content {
                                        opacity: 1;
                                        transform: translateY(0) scale(1);
                                        filter: blur(0);
                                        transition: opacity .4s ease-out .1s, transform .4s ease-out .1s, filter .4s ease-out .1s, color .3s ease;
                                    }
                                }

                                & .module-card--content {
                                    position: relative;
                                    display: grid;
                                    grid-template-columns: auto 1fr;
                                    padding: 0 1rem;
                                    gap: 1.5rem;
                                    font-weight: 500;
                                    opacity: 0;
                                    text-align: left;
                                    transform: translateY(0) scale(1);
                                    filter: blur(0);
                                    transition: opacity .4s ease-out .1s, transform .4s ease-out .1s, filter .4s ease-out .1s, color .3s ease;

                                    & .module-number {
                                        font-size: 1rem;
                                        font-weight: 600;
                                        color: var(--wp--preset--color--contrast);
                                        position: absolute;
                                        top: -3rem;
                                        right: .7rem;
                                        background-color: color-mix(in srgb, var(--wp--preset--color--secondary) 65%, transparent);
                                        border-radius: 50%;
                                        display: grid;
                                        place-content: center;
                                        width: 32px;
                                        height: 32px;
                                    }

                                    & .module-icon {
                                        transform: translateY(.3rem);
                                        background-color: color-mix(in srgb, var(--wp--preset--color--tertiary) 35%, transparent);
                                        color: var(--wp--preset--color--primary);
                                        width: 50px;
                                        height: 50px;
                                        display: grid;
                                        place-content: center;
                                        transition: color .3s ease;

                                        & svg {
                                            width: 18px;
                                            height: 18px;
                                        }
                                    }
                                }
                            }
                        }
                    }

                    & .slideshow-bullets-wrapper {
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        padding: .5rem;
                        position: relative;
                        z-index: 5;

                        & .btn-pagination {
                            background-color: transparent;
                            color: var(--wp--preset--color--primary);
                            opacity: .5;
                            transition: opacity .3s ease, transform .3s ease;

                            &:hover {
                                background-color: transparent;
                                opacity: 1;
                            }
                        }

                        & .slideshow-bullets {
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            gap: 20px;

                            & .bullet {
                                width: 13px;
                                height: 13px;
                                border-radius: 50%;
                                background-color: transparent;
                                border: 2px solid var(--wp--preset--color--primary);
                                transition: background-color .3s ease;

                                &.active {
                                    background-color: var(--wp--preset--color--primary);
                                }
                            }
                        }
                    }

                    & .audience-item {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: center;
                        text-align: center;
                        gap: 1rem;
                        padding: 1.5rem 1rem;
                        height: 100%;
                        box-sizing: border-box;

                        & .audience-icon {
                            color: var(--wp--preset--color--primary);
                            display: flex;
                            align-items: center;
                            justify-content: center;

                            & svg {
                                width: 40px;
                                height: 40px;
                            }
                        }

                        & .audience-label {
                            font-size: 0.95rem;
                            font-weight: 600;
                            line-height: 1.3;
                            color: rgba(0, 0, 0, 0.8);
                        }
                    }

                    & .authority-item {
                        display: flex;
                        align-items: center;
                        gap: 1.25rem;
                        padding: 1.5rem;
                        height: 100%;
                        box-sizing: border-box;
                        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                            border-color 0.3s ease,
                            box-shadow 0.3s ease;

                        & .authority-icon {
                            color: var(--wp--preset--color--primary);
                            flex-shrink: 0;
                            display: flex;
                            align-items: center;
                            justify-content: center;

                            & svg {
                                width: 42px;
                                height: 42px;
                            }
                        }

                        & .authority-text {
                            display: flex;
                            flex-direction: column;
                            gap: 0.35rem;
                            text-align: left;

                            & strong {
                                font-size: 1.05rem;
                                font-weight: 700;
                                color: rgba(0, 0, 0, 0.85);
                                line-height: 1.35;
                            }

                            & span {
                                font-size: 0.9rem;
                                color: rgba(0, 0, 0, 0.55);
                                line-height: 1.4;
                            }
                        }
                    }
                }
            }

            & .cert-panel {
                position: relative;
                background:
                    linear-gradient(135deg,
                        var(--wp--preset--color--contrast) 0%,
                        color-mix(in srgb, var(--wp--preset--color--contrast) 90%, var(--wp--preset--color--primary)) 50%,
                        color-mix(in srgb, var(--wp--preset--color--contrast) 80%, var(--wp--preset--color--primary)) 100%);
                padding: 4rem 3rem;
                text-align: center;
                overflow: hidden;
                box-shadow: var(--wp--preset--shadow--post-shadow);
                display: grid;
                place-content: center;

                /* Resplandor interno dinámico */
                &::before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    background: radial-gradient(1000px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.2), transparent 40%);
                    opacity: 0;
                    transition: opacity 0.4s ease;
                    pointer-events: none;
                    z-index: 1;
                    border-radius: inherit;
                    corner-shape: inherit;
                }

                /* Borde dinámico que sigue al ratón */
                &::after {
                    content: "";
                    position: absolute;
                    inset: -1px;
                    background: radial-gradient(500px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.4), transparent 50%);
                    opacity: 0;
                    transition: opacity 0.4s ease;
                    pointer-events: none;
                    z-index: 2;
                    border-radius: inherit;
                    corner-shape: inherit;
                    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                    -webkit-mask-composite: xor;
                    mask-composite: exclude;
                    padding: 1px;
                }

                &:hover::before,
                &:hover::after {
                    opacity: 1;
                }

                & .cert-panel-backdrop {
                    position: absolute;
                    inset: 0;
                    background-color: #00000080;
                    z-index: 0;
                }

                & .cert-panel-content {
                    position: relative;
                    z-index: 2;
                    max-width: 700px;
                    margin-inline: auto;
                }

                & .cert-headline {
                    font-size: clamp(1.5rem, 3vw, 2.5rem);
                    font-weight: 600;
                    color: var(--wp--preset--color--base);
                    line-height: 1.2;
                    margin-bottom: 1.25rem;
                    letter-spacing: -0.02em;
                }

                & .cert-subheadline {
                    font-size: clamp(1rem, 1.5vw, 1.15rem);
                    color: var(--wp--preset--color--base);
                    line-height: 1.6;
                    margin-bottom: 2.5rem;
                    max-width: 560px;
                    margin-inline: auto;
                }

                & .cert-actions {
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: center;
                    gap: 1rem;
                    margin-bottom: 2rem;

                    & .cert-btn-primary {
                        background-color: var(--wp--preset--color--focus);
                    }

                    & .cert-btn-secondary {
                        color: var(--wp--preset--color--base);
                        border: 1px solid color-mix(in srgb, var(--wp--preset--color--base) 30%, transparent);
                        transition: border-color 0.3s ease;

                        &:hover {
                            border-color: color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent);
                        }
                    }
                }

                & .cert-microcopy {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: 0.5rem;
                    font-size: 0.85rem;
                    color: color-mix(in srgb, var(--wp--preset--color--base) 50%, transparent);
                    margin: 0;

                    & svg {
                        flex-shrink: 0;
                        opacity: 0.6;
                    }
                }
            }
        }

        & .certifications-info-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 2rem;
            padding: 1.75rem 2.5rem;
            background: color-mix(in srgb, var(--wp--preset--color--secondary) 70%, transparent);
            backdrop-filter: blur(4px);
            border: 1px solid var(--wp--preset--color--primary);
            margin-top: 3rem;

            & .info-bar-item {
                display: flex;
                align-items: center;
                gap: 1.25rem;
                flex: 1;
                min-width: 250px;
                text-align: left;

                & .info-bar-icon {
                    color: var(--wp--preset--color--primary);
                    flex-shrink: 0;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    & svg {
                        width: 36px;
                        height: 36px;
                    }
                }

                & .info-bar-text {
                    display: flex;
                    flex-direction: column;
                    gap: 0.25rem;

                    & strong {
                        font-size: 1.1rem;
                        font-weight: 700;
                        color: rgba(0, 0, 0, 0.85);
                        line-height: 1.3;
                    }

                    & span {
                        font-size: 0.95rem;
                        color: rgba(0, 0, 0, 0.6);
                        line-height: 1.3;
                    }
                }
            }
        }

        & .modules-footer-panel {
            margin-top: 3rem;
            text-align: left;

            & p {
                margin: 0;
            }
        }
    }

}



@media (width >=768px) {
    #certification {
        & .content {
            & .grid-containers {
                grid-template-columns: clamp(300px, 128px + 16.8vw, 450px) 1fr;
            }
        }
    }
}

@media (max-width: 1024px) {
    #certification .content .certifications-info-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
        padding: 2rem 1.5rem;

        & .info-bar-item {
            min-width: unset;
        }
    }
}

@media (width > 1024px) {
    #certification {
        & .content {
            & .certifications-info-bar {
                & .info-bar-item:nth-child(2) {
                    justify-content: center;
                }

                & .info-bar-item:last-child {
                    & .info-bar-icon {
                        margin-left: auto;
                    }
                }
            }
        }
    }
}