/* ==========================================================================
    SLIDER #2
   ========================================================================== */

/* FONDO */
.bg-slider-tech-2 {
    background-color: #121214;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #121214 0%, #1a1a2e 100%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
}

.animacion_slider_2 {
    animation: tracking-in-expand-fwd 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

.animacion_slider_2:nth-child(1) { animation-delay: 0s; }
.animacion_slider_2:nth-child(2) { animation-delay: 0.5s; }
.animacion_slider_2:nth-child(3) { animation-delay: 1s; }

/* Contenedor de cada item badge */
.service-item-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: fadeInUpBadge 0.8s ease forwards;
    opacity: 0; /* Inicia oculto para la ejecución fluida de la animación */
}

/* Retrasos de aparición escalonada */
.service-item-badge:nth-child(1) { animation-delay: 0.2s; }
.service-item-badge:nth-child(2) { animation-delay: 0.4s; }
.service-item-badge:nth-child(3) { animation-delay: 0.6s; }
.service-item-badge:nth-child(4) { animation-delay: 0.8s; }
.service-item-badge:nth-child(5) { animation-delay: 1.0s; }
.service-item-badge:nth-child(6) { animation-delay: 1.2s; }
.service-item-badge:nth-child(7) { animation-delay: 1.4s; }
.service-item-badge:nth-child(8) { animation-delay: 1.6s; }

.circle-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
}

/* El Badge (Etiqueta flotante superior) */
.badge-tag {
    position: absolute;
    top: -40px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.badge-tag::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary);
}

.service-item-badge:hover .badge-tag {
    opacity: 1;
    transform: translateY(0);
}

.service-item-badge:hover .circle-icon {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(39, 93, 173, 0.5);
    color: #fff;
}

/* ==========================================================================
    ESTILOS DEL MODAL DE CATÁLOGO COMPLETO ESCALABLE
   ========================================================================== */

.main-modal-title {
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* Tarjeta individual del Servicio */
.card-servicio-completo {
    background-color: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Animación Hover en la tarjeta */
.card-servicio-completo:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(39, 93, 173, 0.12);
}

.card-servicio-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Contenedores de Iconos basados en tus Categorías */
.icon-servicio-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
}

/* Badges de texto lateral */
.badge-tag-servicio {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

/* Botones de acción interna */
.btn-action-servicio {
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px;
    background-color: transparent;
    transition: all 0.2s ease;
}

.btn-action-servicio:hover {
    color: #ffffff !important;
}


/* ==========================================================================
    EFECTO DE ANIMACIÓN EN CASCADA (RETRASO POR VARIABLE)
   ========================================================================== */

/* Cuando el modal se abre (.show), las tarjetas aparecen progresivamente */
.modal.show .item-servicio-animado {
    opacity: 0;
    animation: fade-up-servicios 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    /* Calcula el retraso de manera matemática usando la variable del HTML */
    animation-delay: calc(var(--delay) * 0.08s);
}
