.fin-section {
    background: linear-gradient(135deg, #18516b 0%, #1c6b85 50%, #18516b 100%);
    color: #fff;
    padding: 100px 20px;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Efecto de partículas sutiles en el fondo */
.fin-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 76, 116, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 164, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.fin-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.fin-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0f7fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ======== GRID MODERNO ======== */
.fin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    /* Aumentado para dar espacio al botón exterior */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* ======== CARD MODERNO ======== */
.fin-card {
    background: linear-gradient(145deg, rgba(121, 76, 116, 0.9) 0%, rgba(90, 60, 100, 0.9) 100%);
    border-radius: 24px;
    padding: 40px 32px 40px 40px;
    /* Más padding izquierdo para el botón exterior */
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
    /* Cambiado a visible para que el botón no se corte */
    margin-top: 30px;
    /* Espacio superior para el botón */
}

.fin-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.fin-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.fin-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

/* ======== NÚMERO EXTERIOR - POSICIONADO FUERA DEL CARD ======== */
.fin-num {
    position: absolute;
    top: -30px;
    /* Posicionado por encima del card */
    left: -30px;
    /* Posicionado a la izquierda del card */
    background: linear-gradient(135deg, #00a4a6 0%, #008c8e 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    width: 60px;
    /* Ligeramente más grande para mayor impacto */
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 20px rgba(0, 164, 166, 0.3),
        0 0 0 4px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    /* Alto z-index para asegurar que esté por encima */
}

.fin-card:hover .fin-num {
    transform: scale(1.1) rotate(5deg);
    box-shadow:
        0 12px 25px rgba(0, 164, 166, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.15);
}

/* ======== RESPONSIVE MEJORADO ======== */
@media (max-width: 900px) {
    .fin-section {
        padding: 80px 20px;
    }

    .fin-header h2 {
        font-size: 2.2rem;
    }

    .fin-grid {
        grid-template-columns: 1fr;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 40px;
        /* Espacio aumentado para móviles */
        padding: 40px 0 30px;
        /* Más padding superior para el botón */
        scroll-padding: 0 20px;
    }

    .fin-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
        margin: 0 20px;
        /* Margen lateral aumentado */
        padding: 35px 28px 35px 35px;
        /* Padding izquierdo aumentado */
        margin-top: 40px;
        /* Más espacio superior para el botón en móviles */
    }

    .fin-card:hover {
        transform: none;
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.25),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    /* Ajuste del botón para móviles */
    .fin-num {
        top: -35px;
        left: -25px;
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }

    /* Scrollbar personalizado */
    .fin-grid::-webkit-scrollbar {
        height: 6px;
    }

    .fin-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

    .fin-grid::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #00a4a6 0%, #794c74 100%);
        border-radius: 10px;
    }
}

/* Efectos de animación suave */
@media (prefers-reduced-motion: no-preference) {
    .fin-card {
        animation: fadeInUp 0.6s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}