/* Estilos generales de la sección */
.servicios-section {
    background: radial-gradient(circle at top, rgba(15, 25, 45, 0.85) 0%, rgba(10, 10, 10, 0.95) 35%),
                linear-gradient(135deg, #0a0a0a 0%, #161616 100%);
    padding: 10rem 2.5rem 9rem;
    position: relative;
    overflow: hidden;
}

.servicios-section::before {
    content: '';
    position: absolute;
    top: -110px;
    left: 0;
    width: 100%;
    height: 160px;
    background: radial-gradient(120% 150px at 50% 100%, rgba(0, 242, 254, 0.25), transparent 75%);
    filter: blur(25px);
    opacity: 0.8;
    pointer-events: none;
}

.servicios-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 60%);
    height: 4px;
    background: linear-gradient(90deg, #1860ff, #00f2fe);
    border-radius: 999px;
    opacity: 0.65;
}

.servicios-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    color: #fff;
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1860ff, #00f2fe);
    border-radius: 2px;
}

.section-subtitle {
    color: #a0a0a0;
    font-size: 1.65rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Grid de servicios */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    padding: 0 1rem;
    max-width: 1180px;
    margin: 0 auto;
}

/* Tarjetas de servicios */
.servicio-card {
    --servicio-accent: #1860ff;
    background: linear-gradient(155deg, rgba(12, 16, 26, 0.92) 0%, rgba(6, 8, 15, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    isolation: isolate;
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 28px 45px rgba(15, 40, 90, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}

.servicio-card.destacado {
    border-color: rgba(0, 242, 254, 0.45);
    box-shadow: 0 30px 60px rgba(0, 190, 255, 0.25);
}

.servicio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(40, 65, 120, 0.35) 0%, rgba(0, 0, 0, 0));
    opacity: 0.6;
    pointer-events: none;
}

.servicio-visual {
    position: relative;
    height: 190px;
    background: linear-gradient(135deg, rgba(24, 96, 255, 0.2), rgba(0, 0, 0, 0.4));
    background-image: var(--servicio-illustration);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1) contrast(0.95);
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}

.servicio-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 7, 13, 0.1) 0%, rgba(5, 7, 13, 0.85) 70%, rgba(5, 7, 13, 1) 100%);
}

.servicio-visual::before {
    content: '';
    position: absolute;
    inset: -40% -40% 50% 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
    opacity: 0.4;
    transform: rotate(25deg);
}

.servicio-body {
    position: relative;
    z-index: 2;
    padding: 2.5rem 2.2rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.servicio-tag {
    align-self: flex-start;
    padding: 0.45rem 1.4rem;
    background: linear-gradient(135deg, var(--servicio-accent), rgba(255, 255, 255, 0));
    color: #ffffff;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.servicio-icon {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: linear-gradient(135deg, var(--servicio-accent), rgba(0, 242, 254, 0.65));
    font-size: 1.9rem;
    color: #fff;
    box-shadow: 0 14px 32px rgba(24, 96, 255, 0.25);
}

.servicio-body .servicio-icon {
    align-self: flex-start;
}

.servicio-card h3 {
    color: #fff;
    font-size: 2.4rem;
    margin: 0;
    font-weight: 600;
}

.servicio-card p {
    color: #b9c7e3;
    font-size: 1.5rem;
    line-height: 1.65;
    margin: 0;
}

.servicio-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.servicio-features li {
    color: #d1d1d1;
    padding-left: 2.2rem;
    position: relative;
    font-size: 1.3rem;
}

.servicio-features li::before {
    content: '✓';
    color: #00f2fe;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Badge para servicios populares - Estilo renovado */
.badge-popular {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #00f2fe, #1860ff);
    color: white;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse 2s infinite;
}

.badge-popular::before {
    content: '★';
    font-size: 0.9em;
    color: #FFD700;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Efecto de borde en hover */
.servicio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--servicio-accent), #00f2fe) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.servicio-card:hover::after {
    opacity: 1;
}

.servicio-card:hover .servicio-visual {
    transform: scale(1.03);
    filter: saturate(1.2) contrast(1.02);
}

.servicio-card:hover .servicio-icon {
    box-shadow: 0 20px 40px rgba(24, 96, 255, 0.35);
}

/* Responsive */
@media (max-width: 992px) {
    .servicios-grid {
        grid-template-columns: 1fr;
        max-width: 620px;
        padding: 0 1.5rem;
    }
    
    .servicio-card {
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1.2rem;
        padding: 0 1.5rem;
        margin-bottom: 2rem;
    }
    
    .servicios-grid {
        padding: 0;
        gap: 2rem;
    }
    
    .servicio-card {
        border-radius: 18px;
    }

    .servicio-body {
        padding: 2.2rem 1.8rem 2rem;
    }

    .servicio-visual {
        height: 170px;
    }
}

.servicio-card {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.8s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}