.inicio_services {
    width: 100%;
    min-height: 600vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--dark);
    transition:
        opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1),
        filter 0.7s cubic-bezier(0.77, 0, 0.175, 1),
        visibility 0.7s;
}

.inicio_services.transition-metal {
    filter: blur(8px) brightness(1.3) contrast(1.5) grayscale(0.2) drop-shadow(0 0 30px #bfc6d1);
    opacity: 0.5;
    animation: metallic-shine 0.7s;
}

.inicio_services.visible {
    filter: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.inicio_services.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
}

.inicio_services_tarjetas {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 700vh;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 10vw 0 0;
}

.inicio_services_tarjetas .servicio {
    width: 45dvw;
    min-height: 50vh;
    margin-bottom: 5vh;
    border: 1px solid var(--grey);
    border-radius: 15px;
    background: var(--dark);
    box-shadow: rgba(62, 76, 88, 0.48) 6px 2px 16px 0px, rgba(0, 0, 0, 0.8) -6px -2px 16px 0px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: space-around;
    right: 0;
    left: auto;
    transition: box-shadow 0.3s, border-color 0.3s, top 0.3s;
    z-index: 10;
    margin-right: 5%;
    opacity: 1;
    padding: 2% 5%;
}

.inicio_services_tarjetas .servicio h2 {
    font-size: 2.5rem;
    color: var(--white);
    font-weight: 300;
}

.inicio_services_tarjetas .servicio .btn {
    position: relative;
    z-index: 9999;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.inicio_services_tarjetas .servicio p {
    font-size: 1.2rem;
    color: var(--grey);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 3%;
    border-radius: 12px;
}

/* Sticky states */
.servicio.sticky-active {
    position: fixed !important;
    top: 50%;
    right: 2vw;
    left: auto;
    transform: translateY(-50%);
    z-index: 100;
    width: 45vw;
}

.servicio.sticky-stacked {
    position: absolute !important;
    right: 2vw;
    left: auto;
    width: 45vw;
    transform: none;
}

.servicio.sticky-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Canvas de puntos solo visible en la tarjeta sticky-active */
.servicio .dots-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    z-index: 1;
    border-radius: 18px;
    opacity: 1;
    transition: opacity 0.3s;
}

.servicio.sticky-active .dots-bg-canvas {
    /* El canvas ahora es visible siempre, no solo en sticky-active */
}

.servicio>*:not(.dots-bg-canvas) {
    position: relative;
    z-index: 2;
}

@media (max-width: 1300px) {

    .servicio.sticky-active .btn{
        width: 80%;
    }
}

@media (max-width: 900px) {

    .inicio_services_tarjetas {
        position: relative;
        width: 100%;
        min-height: 700vh;
        display: flex;
        flex-direction: column;
        align-items: start;
        justify-content: start;
        padding: 0 0 0 0;
    }
    
    .servicio.sticky-active, .servicio{
        width: 80%;
        min-height: 40dvh;
        height: 40dvh;
        top: 20%;
        transform: translate(-5%);
    }

    .servicio.sticky-active h2{
        font-size: 1.5rem;
    }
}

@media (max-width: 600px){
    .servicio.sticky-active, .servicio{
        min-height: 40dvh;
        height: 40dvh;
        top: 20%;
        transform: translate(-5%);
    }

    .servicio.sticky-active h2{
        font-size: 1.5rem;
    }

    .servicio.sticky-active p{
        font-size: 0.9rem;
    }

    .servicio.sticky-active .btn{
        width: 90%;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px){
    .servicio.sticky-active .btn{
        width: 100%;
    }
}